Re: Spaces in file names
- From: "Leslie Rhorer" <lrhorer@xxxxxxxxxxx>
- Date: Mon, 31 Dec 2007 02:35:24 -0600
Hey, that works! Thanks.
"Dan Mills" <dmills@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:477856c3$0$21094$da0feed9@xxxxxxxxxxxxxxxxx
On Sun, 30 Dec 2007 19:31:45 -0600, Leslie Rhorer wrote:
OK, here's the problem. I need to automatically manipulate the file
names
of a number of files whose filenames have spaces in them.
for file in `ls -1 *`
do
<do stuff>
done
How about something like (untested):
#!/bin/bash
IFS=$'\n'
#IFS is the internal field separator in bash and
#here we set it to be new line only.
for file in $(find . -type f)
do
<stuff with "$file">
done
HTH.
Regards, Dan.
.
- Follow-Ups:
- Re: Spaces in file names
- From: Floyd L. Davidson
- Re: Spaces in file names
- References:
- Spaces in file names
- From: Leslie Rhorer
- Re: Spaces in file names
- From: Dan Mills
- Spaces in file names
- Prev by Date: Re: Spaces in file names
- Next by Date: Re: Spaces in file names
- Previous by thread: Re: Spaces in file names
- Next by thread: Re: Spaces in file names
- Index(es):
Relevant Pages
|