Date: Thu, 08 Nov 2007 23:49:24 -0300 From: =?ISO-8859-1?Q?Sd=E4vtaker?= <sdavtaker@gmail.com> To: questions@freebsd.org Subject: problems using ls with for_in (SH) Message-ID: <4733CAB4.2080508@gmail.com>
next in thread | raw e-mail | index | archive | help
Im trying to get a file with all the md5 hashes of one directory.
My initial script was this:
#!/bin/sh
for file in $(ls)
do
echo $file
md5 $file
done
The problem is with the file names who contains "whitespaces" becouse
the for_in passed each word as one iteration and not the full filename,
I'd tried using -B in ls, but doesnt help.
Any idea what can i do?
Thanks!
Sdäv
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4733CAB4.2080508>
