diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-05-30 21:12:58 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-05-30 21:12:58 +0200 |
| commit | 518fd1dd0ec5f3dd4019e868ea2ec5a2009f24ad (patch) | |
| tree | d6b20acdaab2e5beccde2474415e9f53ea1bee10 | |
| parent | cb6e225e1293d2d7f95320acdb2b21712e4c721c (diff) | |
| download | scripts-518fd1dd0ec5f3dd4019e868ea2ec5a2009f24ad.tar.gz scripts-518fd1dd0ec5f3dd4019e868ea2ec5a2009f24ad.zip | |
Replaced \t (non-portable) with literal tab
| -rwxr-xr-x | virename | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -15,8 +15,8 @@ if [ "$(wc -l $file | awk '{print $1}')" != \ | |||
| 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 f; do |
| 18 | fold=$(echo "$f" | sed 's/\t.*//') | 18 | fold=$(echo "$f" | sed 's/ .*//') |
| 19 | fnew=$(echo "$f" | sed 's/.*\t//') | 19 | fnew=$(echo "$f" | sed 's/.* //') |
| 20 | if [ "$fold" != "$fnew" ]; then | 20 | if [ "$fold" != "$fnew" ]; then |
| 21 | mv "$fold" "$fnew" \ | 21 | mv "$fold" "$fnew" \ |
| 22 | || echo "Error renaming $fold to $fnew" | 22 | || echo "Error renaming $fold to $fnew" |
