add a mass rename script
This commit is contained in:
parent
c23635a853
commit
5f17ccf995
|
@ -0,0 +1,14 @@
|
|||
temp=$(mktemp)
|
||||
ls > $temp
|
||||
nvim $temp
|
||||
results=$(ls | paste -d'|' - $temp)
|
||||
|
||||
IFS="
|
||||
"
|
||||
for i in $results; do
|
||||
before="${i%%|*}"
|
||||
after="${i#*|}"
|
||||
|
||||
[ "$before" != "$after" ] && mv "$before" "$after"
|
||||
printf "%s -> %s\n" "$before" "$after"
|
||||
done
|
Loading…
Reference in New Issue