I converted all the flac in my music library down to mp3, so I can move the flac to an external drive. I used dbpoweramp in windows, and I'm pretty sure it converted them all, but when I woke up this morning, the netbook had been restarted.

So I've made a list with all my music in it and used sort to alphabetize it. So I have something like this:

~/music/a/a.flac
~/music/a/a.mp3
~/music/a/b.flac
~/music/a/b.mp3
~/music/b/a.mp3
~/music/b/b.mp3
~/music/c/a.flac
~/music/c/a.mp3


Note that I have a directory with only mp3, since not my whole library was flac.

What I want is a bash script that will check that all lines that end with .flac have a line directly below them that is the same except it ends with .mp3.

How would I achieve this, and if you can explain what the script is doing, that would be cool too.

I guess it's sorta important to show any lines that end with .flac that DON'T have a matching .mp3, as they need converted still.


Question: I can't find a PFET protected against ESD
Answer: I would like to add that it seems to me like a very futile effort to only use ESD-protected FETs. If you have a FET that is large enough to hold in your hand, it is already fairly rugged by virtue of physics. Gate and drain-source capacitance make sure that whatever charge you can inject into the device will not cause large enough voltages to spark over.

But much more importantly: when handling any other active device, you are probably holding tens, hundreds, thousands of tiny little FETs in your hand, each and every one of them orders of magnitude more sensitive to ESD. There is usually some protection on the outgoing pins, but I'm afraid that the only way to really set yourself free from the worry of ESD is to regard proper ESD safety:


Regard air humidity at all times, try to keep it high (70%+). Air humidity dissipates static charges extremely effectively.
When dealing with sensitive devices - something that is almost always mentioned in the datasheet or on the package if this is especially so - wear an ESD dissipative wrist band connected to an ESD mat, which in turn is connected to your mains electricity ground with an appropriate connector. ESD mats nowadays are very inexpensive.
Regard your clothing. Do not wear clothing with long exposed fibers (e.g. wool).


This way  you will be able to enjoy electronics with access to the full gamut of devices, instead of having to artificially limit yourself to only those which explicitly advertise ESD protection. Which doesn't guarantee you in any way that you do avoid ESD damage either!