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
Auto remove special characters from file names in Linux
-
- Posts: 1
- Joined: 15 Jul 2014, 09:02
Re: Auto remove special characters from file names in Linux
Hi,
Sorry for the late reply, I was in holidays and this part of the forum is sadly not answered a lot when I'm not available.
To execute a command you could use the Process object: http://wiki.actionaz.org/doku.php?id=en ... em:process
All of this can be used within a Code action or by activating the code mode in any parameter.
Sorry for the late reply, I was in holidays and this part of the forum is sadly not answered a lot when I'm not available.
For the text processing you could use the "code mode" (red triangle) and use some Javascript to do what you want. Invoking using a keyboard shortcut is only possible using the "start script" global shortcut (default is Ctrl+Alt+Q). It is currently not possible to setup a specific shortcut for a script.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.
There are some functions to interact with the clipboard: http://wiki.actionaz.org/doku.php?id=en ... :clipboardIf 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')
To execute a command you could use the Process object: http://wiki.actionaz.org/doku.php?id=en ... em:process
All of this can be used within a Code action or by activating the code mode in any parameter.
"My software never has bugs. It just develops random features."