[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: spaces in filenames



-- Sheldon Lee-Wen <sheldon.leewen@cgi.com> wrote
(on Thursday, 06 February 2003, 01:11 PM -0500):
> Hi,
> 
>    I'm trying to write a script where I can get the names of files in a 
> directory. Normally this is easy, like this:
> 
>        for doc in `ls /var/www/htlml/files`
>         do
> 		echo $i
>  	done
> 
> However, some of the files have spaces in the names, like "My File.html"
> How do I get $doc to have the correct file name?

echo "$doc"

-- 
Matthew Weier O'Phinney
matthew@weierophinney.net



Reply to: