]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/linux.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 16 May 2019 00:04:58 +0000 (01:04 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 16 May 2019 00:04:58 +0000 (01:04 +0100)
etc/profile.d/linux.sh

index c27105258377a9f20e81653f93c6c94dff1a6259..afb4f90a85459a2d120a9a1d9c947cf8fe692c66 100644 (file)
@@ -1,5 +1,5 @@
 case "$OSTYPE" in linux*) [ 1 ] ;; *) return ;; esac
 
 modprobe_ls() {
-       find /lib/modules/$(uname -r) -type f -name '*.ko' | sed -E -e 's,^.*/([^/]+)\.ko$,\1,'
+       find /lib/modules/$(uname -r) -type f -name '*.ko' | sed -E -e 's,^.*/([^/]+)\.ko$,\1,' | grep "${1:-^}"
 }