diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-06-20 23:01:09 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-06-20 23:01:09 +0200 |
| commit | 581865ee0c8b8aea872f053d804a41fb5f416b17 (patch) | |
| tree | 9a2f99ea48c31629a5c3c42b0454483982cdbfed /virename | |
| parent | c5d101ab2c9db3b1a001cb56953cb90b24f8fdcf (diff) | |
| download | scripts-581865ee0c8b8aea872f053d804a41fb5f416b17.tar.gz scripts-581865ee0c8b8aea872f053d804a41fb5f416b17.zip | |
Various shellcheck fixes (www.shellcheck.net)
Diffstat (limited to 'virename')
| -rwxr-xr-x | virename | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -10,11 +10,11 @@ editor=${EDITOR:-vi} | |||
| 10 | ls | tee "$file" > "$file2" | 10 | ls | tee "$file" > "$file2" |
| 11 | $editor "$file2" | 11 | $editor "$file2" |
| 12 | 12 | ||
| 13 | if [ "$(wc -l $file | awk '{print $1}')" != \ | 13 | if [ "$(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" |
| 16 | else | 16 | else |
| 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 |
