Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Don't ask to ask, just ask
 
PerlMonks  

Random RedWolf OneLiners

by strredwolf (Chaplain)
on Feb 20, 2002 at 07:27 UTC ( #146516=snippet: print w/ replies, xml ) Need Help??

Description: Ok, I got inspired while converting my MP3 collection to Ogg Vorbis. Here's a few oneliners I used.
Convert all MP3's in directories given to it.
perl -e 'while(<>){chomp;print "*** $_ ***\n";chdir"$_";system "mp32og
+g --maxbitrate 128 *.mp3";}'

Clean up any duplicate messes in current directory that may belong someplace else.

perl -e 'while(<>){chomp;@z=`find . -name "$_"`;unlink $_ if($#z);}' <
+ temp.txt
Comment on Random RedWolf OneLiners
Select or Download Code
Re: Random RedWolf OneLiners
by broquaint (Abbot) on Feb 20, 2002 at 11:01 UTC
    Check out perl -h or perlrun and read up on some of the neat switches that are available on the command line e.g.
    perl -lne 'chomp; print "*** $_ ***"; chdir "$_"; system "mp32ogg --maxbitrate 128 *.mp3"'
    The -n sticks a while(<>){ } around the code and -l (by default) sets $\ to $/.
    HTH

    broquaint

Back to Snippets Section

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: snippet [id://146516]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-04-18 07:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (462 votes), past polls