diff options
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 |
