Auto remove special characters from file names in Linux
Posted: 15 Jul 2014, 09:20
Hello,
I wonder if I can do something like here: http://superuser.com/questions/399464/f ... ring-savin using actionaz, i.e. do an action on selected text and invoke it via keyboard shortcut.
If it's not possible yet, it would be enouth to read text from clipboard, execute a command on it and write it back to clipboard. Sample command to execute could be:
# F is original file name, newF is new file name
newF=$(echo "$F" | perl -ane 'foreach $wrd(@F){print ucfirst($wrd)." ";}' | sed 's|[^a-zA-Z0-9_.-]||g')
Could you advise how to achieve it?
Regards,
- Dawid
I wonder if I can do something like here: http://superuser.com/questions/399464/f ... ring-savin using actionaz, i.e. do an action on selected text and invoke it via keyboard shortcut.
If it's not possible yet, it would be enouth to read text from clipboard, execute a command on it and write it back to clipboard. Sample command to execute could be:
# F is original file name, newF is new file name
newF=$(echo "$F" | perl -ane 'foreach $wrd(@F){print ucfirst($wrd)." ";}' | sed 's|[^a-zA-Z0-9_.-]||g')
Could you advise how to achieve it?
Regards,
- Dawid