Script madness! Or, why I love the shell prompt
Posted 03-21-2010 at 08:50 PM by Raveolution
So today I decided I was tired of dealing with a whole large directory of zip files. Since all the zip files were uniquely named, I figured might as well make a corresponding directory name and unpack each one in there.
Good luck doing that in Winderz. But I'm not in Winderz. I'm on a shell prompt. So what's a nerd to do.
Well, so far I worked it out this way. In bash, I did:
for i in *.zip;do unzip $i -d `echo $i| sed -e 's/.zip//g'`;done
And it seems to have worked.
This is too cool. Again.
Good luck doing that in Winderz. But I'm not in Winderz. I'm on a shell prompt. So what's a nerd to do.
Well, so far I worked it out this way. In bash, I did:
for i in *.zip;do unzip $i -d `echo $i| sed -e 's/.zip//g'`;done
And it seems to have worked.
This is too cool. Again.
Total Comments 2
Comments
-
GNU/Linux shell puts the Windoze command prompt to shame. Here is an example from tonight. Downloaded some tunes from Amazon, mp3 stored in sub folders in AmazonMP3. Using gnu_pod the line....
gnu_pod ~/Music/AmazonMP3/*/*.mp3 && mktunes
did the job... piece of cake, every mp3 on the iPod. Too cool.
I'm with you 100%...Posted 03-24-2010 at 03:58 PM by dsmyth -
Quote:GNU/Linux shell puts the Windoze command prompt to shame. Here is an example from tonight. Downloaded some tunes from Amazon, mp3 stored in sub folders in AmazonMP3. Using gnu_pod the line....
gnu_pod ~/Music/AmazonMP3/*/*.mp3 && mktunes
did the job... piece of cake, every mp3 on the iPod. Too cool.
I'm with you 100%...Posted 03-25-2010 at 12:43 AM by Raveolution