On 2013-01-29 12:51, Linda Walsh wrote:
> It doesn't handle the "-r" case that you already had, but it does
> remove already loaded modules from the list that is displayed.
A different approach that should accomplish the same is now in git:
http://anonscm.debian.org/gitweb/?p=bash-completion/bash-
It doesn't handle the "-r" case that you already had, but it does
remove already loaded modules from the list that is displayed.
#!/bin/bash
function _clean_n_sort_mods {
modprobe -l |
sed -r 's!^.*/([^/]+)\.ko[ ]*$!\1! ' |
sort
}
function _loaded_mods {
lsmod |sed -r 's/ .*$//'
}