Title: [Bash] 4cdl-rename-tool Author: Twilypastes Pastebin link: http://pastebin.com/bLqHyBPg First Edit: Saturday 6th of June 2015 08:24:16 PM CDT Last Edit: Last edit on: Saturday 6th of June 2015 08:34:02 PM CDT #!/bin/bash # # Intended for renaming selected '4cdl' images for reuploading to 4chan. # Do Not run these over each other or more than once on the same filenames. # Place the selected '4cdl' images in an empty directory along with this file. # Uncomment One of the lines below to use $ sh ./rename   # Removes last upload id; keeping .ext (Only run once) #f=(*); for i in "${f[@]}"; do mv -i "$i" "${i#*-}"; done   # Removes original filename; keeping .ext (Only run once) #f=(*); for i in "${f[@]}"; do mv -i "$i" "${i%%-*}.${i#*.}"; done   exit 0