Hello,
I need to scan a directory for the file names contained in it.
for _scantox in $(ls $_tox); do
.
done
works just file with _scantox holding the file name, However some of the
file names are in the form of
342345\ remind\ for\ apt-get\ update
ie they have escaped spaces in the name.
On Sun, July 13 at 11:05 AM EDT
David selby [EMAIL PROTECTED] wrote:
I need to scan a directory for the file names contained in it.
for _scantox in $(ls $_tox); do
.
done
works just file with _scantox holding the file name, However some of the
file names are in the form of
342345\ remind\
David selby [EMAIL PROTECTED] wrote:
I need to scan a directory for the file names contained in it.
However some of the file names are in the form of
342345\ remind\ for\ apt-get\ update
ie they have escaped spaces in the name.
Without resorting to complex string manipulation cutting,
Steve Lamb wrote:
On Sun, 13 Jul 2003 11:05:41 +0100
David selby [EMAIL PROTECTED] wrote:
I need to scan a directory for the file names contained in it.
for _scantox in $(ls $_tox); do
.
done
Why use ls? Use the shell's globbing. IE, poor man's ls:
bash-2.05b$ echo *
Jeff Schaller wrote:
David selby [EMAIL PROTECTED] wrote:
I need to scan a directory for the file names contained in it.
However some of the file names are in the form of
342345\ remind\ for\ apt-get\ update
ie they have escaped spaces in the name.
Without resorting to
On July 13, 2003 06:05 am, David selby wrote:
I need to scan a directory for the file names contained in it.
for _scantox in $(ls $_tox); do
.
done
If I expect to find files with spaces I always use some variant of this:
ls /somewhere | while read file; do
something $file
done
--
6 matches
Mail list logo