Re: problems using ls with for_in (SH)

2007-11-09 Thread Frank Shute
On Thu, Nov 08, 2007 at 11:49:24PM -0300, Sdvtaker wrote: > > 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 "whit

Re: problems using ls with for_in (SH)

2007-11-09 Thread Vince
Sdävtaker wrote: > 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 w

Re: problems using ls with for_in (SH)

2007-11-08 Thread Dan Nelson
In the last episode (Nov 08), Sdvtaker said: > 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" beco

problems using ls with for_in (SH)

2007-11-08 Thread Robert Huff
=?ISO-8859-1?Q?Sd=E4vtaker?= writes: > 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"

problems using ls with for_in (SH)

2007-11-08 Thread Sdävtaker
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