summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinuxWizard42 <computerwizard@linuxmail.org>2022-06-09 23:39:45 +0300
committerLinuxWizard42 <computerwizard@linuxmail.org>2022-06-09 23:39:45 +0300
commite97722a1b23b1a49e056573d19b8e03f2f6250a1 (patch)
tree65680984b56e8fd3b612f5b50b80d41b940fbcb9
parentef59a3799c6ba8f494c50111356834fa1ad23a44 (diff)
downloadlinux_kernel_scripts-e97722a1b23b1a49e056573d19b8e03f2f6250a1.tar.gz
linux_kernel_scripts-e97722a1b23b1a49e056573d19b8e03f2f6250a1.tar.zst
Better way of replacing things in file names
-rwxr-xr-xgeneratemodlist.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/generatemodlist.sh b/generatemodlist.sh
index 33ed690..cf95d59 100755
--- a/generatemodlist.sh
+++ b/generatemodlist.sh
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
-find /usr/lib/modules/$1/ -type f | grep -i '\.ko\.zst' | xargs basename -a | tr '\n' ' ' | sed 's/\.ko\.zst//g' > mod_list.txt
+find /usr/lib/modules/$1/ -type f | grep -i '\.ko\.zst' | xargs basename -a | sed -z "s/\n/ /g;s/\.ko\.zst//g" > mod_list.txt