aboutsummaryrefslogtreecommitdiff
path: root/virename
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-05-30 21:12:58 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-05-30 21:12:58 +0200
commit518fd1dd0ec5f3dd4019e868ea2ec5a2009f24ad (patch)
treed6b20acdaab2e5beccde2474415e9f53ea1bee10 /virename
parentcb6e225e1293d2d7f95320acdb2b21712e4c721c (diff)
downloadscripts-518fd1dd0ec5f3dd4019e868ea2ec5a2009f24ad.tar.gz
scripts-518fd1dd0ec5f3dd4019e868ea2ec5a2009f24ad.zip
Replaced \t (non-portable) with literal tab
Diffstat (limited to 'virename')
-rwxr-xr-xvirename4
1 files changed, 2 insertions, 2 deletions
diff --git a/virename b/virename
index e0d23bd..137091d 100755
--- a/virename
+++ b/virename
@@ -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"
16else 16else
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"

Generated with cgit - Back to sebastiano.tronto.net