Last active
April 25, 2020 10:38
-
-
Save shdbwa/34c393e5e08f019f1c345ce46dd67d73 to your computer and use it in GitHub Desktop.
Get module configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Searchable list showing kernel modules with (lsmod), piped (|) via (percol). Pipe (|) the output with (awk), filte for the first field (print $1). Grab the result (xargs -0) as argument for (echo) to write it to disk (>) as (/tmp/showmoduleconfig) | |
lsmod | percol | awk '{print $1}'|xargs -0 echo > /tmp/showmoduleconfig ; | |
# Display (cat) previousely selected module config (-m) in verbose mode (-v) with (systool). Remove (rm) the temporary file created (/tmp/showmoduleconfig). Colorize (pygmentize) output like a (linux-config) file with lexer (-l linux-config) | |
systool -v -m (cat /tmp/showmoduleconfig) & rm /tmp/showmoduleconfig | pygmentize -l linux-config ; | |
#One line | |
lsmod|percol|awk '{print $1}'|xargs -0 echo > /tmp/percol;systool -v -m (cat /tmp/percol)|pygmentize -l linux-config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment