Randall R Schulz wrote:
Geir,
On Monday 06 November 2006 15:40, Geir A. Myrestrand wrote:
...
for FILE in '*.mp3'; do echo ${FILE}; done
You should try these things before submitting them. That will only echo (literally) *.mp3. Witness:
% for FILE in '*.mp3'; do echo ${FILE}; done *.mp3
Randall Schulz
I did: chiangmai:/x # env | grep SHELL SHELL=/bin/bash chiangmai:/x # touch "01 Allegro.mp3" chiangmai:/x # touch "02 Adagio un poco mosso.mp3" chiangmai:/x # touch "03 Rondo - Allegro.mp3" chiangmai:/x # ls -l total 0 -rw-r--r-- 1 root root 0 Nov 6 21:55 01 Allegro.mp3 -rw-r--r-- 1 root root 0 Nov 6 21:55 02 Adagio un poco mosso.mp3 -rw-r--r-- 1 root root 0 Nov 6 21:56 03 Rondo - Allegro.mp3 chiangmai:/x # for FILE in '*.mp3'; do echo ${FILE}; done 01 Allegro.mp3 02 Adagio un poco mosso.mp3 03 Rondo - Allegro.mp3 chiangmai:/x # cat /etc/SuSE-release SUSE Linux Enterprise Server 10 (x86_64) VERSION = 10 However, Randall is right --on the second run it doesn't give the right output, so using for example find is the right solution here. -- Geir A. Myrestrand