Aquarionics

Saturday 22nd October 2005

Bash one-liner of the day

Mirage:~/Data/CD aquarion$ find . -name *.m4p 
| sed -e"s/m4p/mp3/g" 
| while read FOO;do BAR=$(basename "$FOO");locate "$BAR" | tail -1; done 
| while read FOO ; do cp $FOO .;done

Okay, so I need to do the rm *.m4p afterwards, but still.

So, question one, what does it do, and question two, what is it for?

Those who spoke on this:

gravatar image

Pol:

2005-10-22 11:18 62 mins after the Original Article

It would appear to try and locate all of the MP3s on your system which also exist as AAC and then copy the MP3 to the current directory.

I’d guess you use it for copying the converted elements of your ITMS for upload to a portable MP3 device.

Comment Link

gravatar image

D:

2005-10-22 11:59 41 mins after Pol

You missed “Mirage:~/Data/CD” at the start.

He’s making a backup of his music. :)

-Dx

Comment Link

gravatar image

Aquarion:

2005-10-22 15:48 4 hrs after D

Pol ‘s closer. The CD is for my MP3 playing CD Player, which doesn’t do AAC.

Comment Link


Nicholas 'Aquarion' Avenell is a web developer in London, you can find out more about him or how to get in touch.

There are more Articles, Projects, Journal Entries, Photographs and things that defy description here, too.

If you're looking for something specific, there are Calendar & Category -based lists of everything.

And if you want to follow stuff that appears here, try a Syndication Feed, or the generic Feed of everything.


Aquarion's last Twitter was: [updating]
Twitter last updated


More Journal:

[RSS Icon]
[ESF Icon]
[CDF Icon]

That which is relevant:


Explain Ads
© 2000 to 2008 inclusive Nicholas Avenell
All comments are the property of their creators, published with permission
(Unless otherwise indicated, the opinions and sentiments expressed on this site are those of the author and not of any organisation of which he is an affiliate, including his employer. Caveat Lector, E&OE. sigh)
0.650 seconds, 22 queries, 2.65Mb on Mon, 25 Aug 2008 22:52:48 +0000
Generated by Epistula Version 2.0.3