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



On Monday 06 November 2006 19:19, Darryl Gregorash wrote:
On 2006-11-06 21:03, Geir A. Myrestrand wrote:
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:

<snip>

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.

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.


Randall Schulz

--
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



Relevant Pages