How to loop over filenames wit …

How to loop over filenames with spaces – I knew this, but it had disappeared in the recesses of my brain.

> for f in `cat /pathtolist/mp3.txt` do cp "$f" /newdirectory done

You didn't say exactly how the file is organised, so I'm going to
guess one filename per line.  (Note that a filename is allowed
to contain the newline character; I'm just hoping that none of
your files do!)

Others have already pointed out that spaces can be tricky.  I'm
going to show you that there really is no problem.  Rather than
iterate using for, use while and read:

while read filename; do cp "$filename" /newdirectory; done < mp3.txt

Voila.

Weather’s been bad for the past few days. No real opportunities for photography. Bah! At least I have 99% of my Christmas shopping done. Meanwhile, Mark has an entertaining piece on “The One Toy”.

Oh yes, If you’re over 20, buy RETRO, a (one off?) mag from games mag, Edge. It has great interviews with old Zzap64! staffers, bits on games of old (Elite anyone?) and other great stuff! If you’re under 20, you probably don’t know what I’m talking about. Hmm, scratch that, if you’re under 24 you probably don’t know what I’m talking about! Getting old ..

Edit in 2019: replaced dead links with archive.org links and copied content of the email from the first link.

The GIMP is annoying me right …

The GIMP is annoying me right now. I’m editing a 1600×1200 image, 3 layers, modifications on each layer, and it’s taking ages to perform simple operations such as “blur” or “magic wand”. I do have the undo-level set at 10, but my machine has plenty of RAM. Grrr.
Evening Sky Over Cork City – Photo taken last week, sky was manipulated to enhance the colour. It’s raining outside now though. *boo hiss*