![]() |
News | Profile | Code | Photography | Looking Glass | Projects | System Statistics | Uncategorized |
Blog |
Can't do this in bash:
(dax:22:02)% pwd /usr/local/www/apache22/www.prolixium.com (dax:22:02)% cd com net /usr/local/www/apache22/www.prolixium.net
Say I have tons of MP4 files. Some have a suffix of "(iTouch).mp4" but most don't. Here's how I list the ones without the iTouch:
% setopt extended_glob % ls *.mp4~*iTouch\).mp4 A Clockwork Orange.mp4 Babylon A.D..mp4 Get Smart.mp4
Maybe I want to remove all files with the "(iTouch).mp4" suffix to just ".mp4" without using Perl or mmv(1):
% autoload -U zmv % ls *.mp4 A Clockwork Orange (iTouch).mp4 Get Smart (iTouch).mp4 Babylon A.D. (iTouch).mp4 % zmv '*(iTouch)*' '$f:s/ (iTouch)//' % ls *.mp4 A Clockwork Orange.mp4 Babylon A.D..mp4 Get Smart.mp4
Just a few things that saved me some time, tonight.
New comments are currently disabled for this entry.
![]() ![]() ![]() ![]() ![]() |
This HTML for this page was generated in 0.001 seconds. |