7 Jun
2011
7 Jun
'11
6:18 p.m.
Am 06.06.2011 22:02, schrieb Dave Reisner:
--- a/functions +++ b/functions @@ -52,11 +52,16 @@ auto_modules ()
all_modules () { - mods=$(find ${MODULEDIR} -name '*.ko' -or -name '*.ko.gz' 2>/dev/null | grep $@ | sort -u) + local -i count=0 + while read -r -d '' mod; do + (( ++count )) + mod=${mod##*/} + mod="${mod%.ko.*}" + printf '%s\n' "${mod//-/_}" + done < <(find "$MODULEDIR" -name '*.ko*' -print0 2>/dev/null | + grep -Zz "$@" | sort -zu)
I don't understand this 'sort' call. You are sorting the file names before stripping the paths. The file names are always unique.