Re: [SLE] bash Script Using Filenames with Embedded Spaces
- From: Lucky Leavell <susemisc@xxxxxxxxxxxxx>
- Date: Tue, 7 Nov 2006 00:11:47 -0500 (EST)
OK, here is my complete scipt which runs under bash on an Ubuntu 6.06
...
raven@static24-89-67-198:~> cat thingy
cd /pub/music/mp3
for i in *.m3u; do echo $i; done
cd ~
Do something other than echo in the loopl. Try applying sum, or ls, e.g.
You'll find unless you quote $i it won't work.
Randall Schulz
system where I have the mp32ogg utility to convert mp3 to ogg files which
k3b can handle:
for i in *.mp3
do
echo $i
mp32ogg $i
done
whch works fine if the only craziness is embedded spaces in the file name;
it failed when there were parentheses but, since that is rare in my
situation, I can live with it. (Of course, if the single quoted $i would
work there ... I'm off to try it!)
Thank you,
Lucky
--
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
- Follow-Ups:
- Re: [SLE] bash Script Using Filenames with Embedded Spaces
- From: Joachim Schrod
- Re: [SLE] bash Script Using Filenames with Embedded Spaces
- From: Randall R Schulz
- Re: [SLE] bash Script Using Filenames with Embedded Spaces
- From: Lucky Leavell
- Re: [SLE] bash Script Using Filenames with Embedded Spaces
- References:
- [SLE] bash Script Using Filenames with Embedded Spaces
- From: Lucky Leavell
- Re: [SLE] bash Script Using Filenames with Embedded Spaces
- From: Randall R Schulz
- Re: [SLE] bash Script Using Filenames with Embedded Spaces
- From: Darryl Gregorash
- Re: [SLE] bash Script Using Filenames with Embedded Spaces
- From: Randall R Schulz
- [SLE] bash Script Using Filenames with Embedded Spaces
- Prev by Date: Re: [SLE] bash Script Using Filenames with Embedded Spaces
- Next by Date: [SLE] Software Updater window
- Previous by thread: Re: [SLE] bash Script Using Filenames with Embedded Spaces
- Next by thread: Re: [SLE] bash Script Using Filenames with Embedded Spaces
- Index(es):
Relevant Pages
|