Re: [SLE] bash Script Using Filenames with Embedded Spaces



On 2006-11-06 21:50, Randall R Schulz wrote:
On Monday 06 November 2006 19:19, Darryl Gregorash wrote:

No, all you need to do is get rid of the quotes around *.mp3.


No. The original question regards files whose names have spaces in them.
If you do that, you'll get the undesirable malfunctions shown in the
original posting.

Mileage must vary, then:

raven@static24-89-67-198:~> ./thingy
Antonio Vivaldi-Gloria Dixit Dominus Magnificat Choir of Kings College
Cambridge and the Academy of Ancient Music.m3u
Georg Friederich Händel-Water Music Suite.m3u
Johannes Brahms-Symphony no 1 in C minor Op 68 Thomas Sanderling
Philharmonia Orchestra.m3u
Johannes Brahms-Symphony no 2 in D major Op 73 Thomas Sanderling
Philharmonic Orchestra.m3u
Johannes Brahms-Symphony no 3 in F major Op 90 Tragic Overture Op 81
Thomas Sanderling Philharmonia Orchestra.m3u
Johannes Brahms-Symphony no 4 in E minor Op 98 Thomas Sanderling
Philharmonia Orchestra.m3u
Mikhail IppolitovIvanov-Liturgy of St John Chrysostom Op 37 Vespers Op
43.m3u
St Petersburg Chamber Choir-Russian Easter.m3u
The Mamas The Papas-Beautiful Thing.m3u
The Mamas The Papas-California Dreamin.m3u
The Mamas The Papas-If You Can Believe Your Eyes and Ears.m3u
The Tallis Scholars-Allegri Miserere Palestrina Missa Papae Marcelli
Mundy Vox Patris Caelestis.m3u
Virtuosi di Praga-Music for the Kings of Spain.m3u
Westminster Abbey Choir and the Abbey Consort-Miserere.m3u
Wolfgang Amadeus Mozart-Requiem Slovak Philharmonic Orchestra.m3u

raven@static24-89-67-198:~> cat thingy
cd /pub/music/mp3
for i in *.m3u; do echo $i; done
cd ~



--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-faq@xxxxxxxx