Last active
November 10, 2017 23:20
-
-
Save denniskupec/a3887f00643d59d73de8fcb0a76f4e00 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
[ -z $1 ] && exit 1; | |
for f in *.$1; | |
do | |
# https://github.com/denniskupec/sfv | |
c=$(sfv "$f") && echo "$c --> $f" | |
mv "$f" "${f%.*} [$c].${f##*.}" | |
done | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function batch-sfv () { | |
[ -z $1 ] && return 1; | |
for f in *.$1; do | |
mv -v "$f" "${f%.*} [$($(which sfv) "$f")].${f##*.}" | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment