These days file or directory names aren't as important and descriptive as they once were and relying on them to guess their content is likely to fail. Yet, there are times that we still need to work on bulk of files and run different commands based only on their names.
Well, to cut a long story short, I wrote a small python script to run arbitrary commands on files or directories, matched using a regular expression pattern. All I can say is that it works and its syntax kinda simple but If you know how to use other standard tools like
Just remember to run the script somewhere unimportant and/or use
Link to the script:
http://masoodmiscprojects.googlecode.com/files/redo-0.3.tar.gz
Well, to cut a long story short, I wrote a small python script to run arbitrary commands on files or directories, matched using a regular expression pattern. All I can say is that it works and its syntax kinda simple but If you know how to use other standard tools like
sed
, grep
, find
, awk
, ... and don't mind typing a few words more, don't try this script and then yell at me. Just remember to run the script somewhere unimportant and/or use
--dry-run
option before working on actual files. I didn't program it to wipe out your hard drive but shit happens. Link to the script:
http://masoodmiscprojects.googlecode.com/files/redo-0.3.tar.gz
No comments:
Post a Comment