]> Sergey Matveev's repositories - nnn.git/commitdiff
Changed bash code to sh
authorath3 <ha05190@protonmail.com>
Wed, 19 Jun 2019 11:40:31 +0000 (13:40 +0200)
committerath3 <ha05190@protonmail.com>
Wed, 19 Jun 2019 11:40:31 +0000 (13:40 +0200)
plugins/md5sum

index 0ba8a1b7f3028015bc987c45a74c13dd10e3362a..76a2571dc2ba05ee3b83cee214337760ddb84bdd 100755 (executable)
@@ -19,9 +19,7 @@ if [ -s "$selection" ]; then
 fi
 
 if [ "$resp" = "s" ]; then
-    arr=$(cat $selection | tr '\0' '\n')
-    { read -r file; } <<< "$arr"
-    file=$(basename "$file").md5
+    file=$(basename "$(cat $selection | tr '\0' '\n' | head -n 1)").md5
     cat "$selection" | sed 's|'"$PWD/"'||g' | xargs -0 -i md5sum {} > "$file"
 else
     if ! [ -z "$1" ] && [ -f "$1" ]; then