aboutsummaryrefslogtreecommitdiff
path: root/virename
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-06-20 23:01:09 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-06-20 23:01:09 +0200
commit581865ee0c8b8aea872f053d804a41fb5f416b17 (patch)
tree9a2f99ea48c31629a5c3c42b0454483982cdbfed /virename
parentc5d101ab2c9db3b1a001cb56953cb90b24f8fdcf (diff)
downloadscripts-581865ee0c8b8aea872f053d804a41fb5f416b17.tar.gz
scripts-581865ee0c8b8aea872f053d804a41fb5f416b17.zip
Various shellcheck fixes (www.shellcheck.net)
Diffstat (limited to 'virename')
-rwxr-xr-xvirename6
1 files changed, 3 insertions, 3 deletions
diff --git a/virename b/virename
index 137091d..8c30ccf 100755
--- a/virename
+++ b/virename
@@ -10,11 +10,11 @@ editor=${EDITOR:-vi}
10ls | tee "$file" > "$file2" 10ls | tee "$file" > "$file2"
11$editor "$file2" 11$editor "$file2"
12 12
13if [ "$(wc -l $file | awk '{print $1}')" != \ 13if [ "$(wc -l "$file" | awk '{print $1}')" != \
14 "$(wc -l $file2 | awk '{print $1}')" ]; then 14 "$(wc -l "$file2" | awk '{print $1}')" ]; then
15 echo "Error reading new file names" 15 echo "Error reading new file names"
16else 16else
17 paste "$file" "$file2" | while read f; do 17 paste "$file" "$file2" | while read -r f; do
18 fold=$(echo "$f" | sed 's/ .*//') 18 fold=$(echo "$f" | sed 's/ .*//')
19 fnew=$(echo "$f" | sed 's/.* //') 19 fnew=$(echo "$f" | sed 's/.* //')
20 if [ "$fold" != "$fnew" ]; then 20 if [ "$fold" != "$fnew" ]; then

Generated with cgit - Back to sebastiano.tronto.net