Compare commits
2 Commits
c23635a853
...
b834f6e76a
Author | SHA1 | Date |
---|---|---|
stupidcomputer | b834f6e76a | |
stupidcomputer | 5f17ccf995 |
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
temp=$(mktemp)
|
||||
ls > $temp
|
||||
nvim "$temp"
|
||||
|
||||
different=$(ls | cat "$temp" - | sort | uniq -u)
|
||||
rm $different
|
||||
for i in $different; do
|
||||
printf "rm %i\n" "$i"
|
||||
done
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
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