diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-06-19 08:27:58 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-06-19 08:27:58 +0200 |
| commit | 2c065927ff405b2d8b2eec6fc1fbee9c4f93e0a8 (patch) | |
| tree | 5b71550334110d98e70dc19a95386ea97ef9d129 /virename | |
| parent | dc98cba24cb5f1f3e260c49fc61add4a113a1df0 (diff) | |
| parent | 518fd1dd0ec5f3dd4019e868ea2ec5a2009f24ad (diff) | |
| download | scripts-2c065927ff405b2d8b2eec6fc1fbee9c4f93e0a8.tar.gz scripts-2c065927ff405b2d8b2eec6fc1fbee9c4f93e0a8.zip | |
Merge branch 'master' of tronto.net:scripts
Diffstat (limited to '')
| -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" |
