Re: Bash question
On Tue, Jul 01, 2003 at 02:46:58AM -0500, Stephan Sauerburger wrote:
> This is a general shell-scripting question:
>
> In a for loop which runs through all files, as in:
>
> for file in `ls`
> do
> #stuff
> done
>
> How do I have it make sure it iterates file-by-file?
There's one mistake in the above even before looking at the contents of
"#stuff", namely that you shouldn't be using ls here. Have a look at
this document written by a friend of mine:
http://www.greenend.org.uk/rjk/2001/04/shell.html
Cheers,
--
Colin Watson [cjwatson@flatline.org.uk]
Reply to:
- References:
- Bash question
- From: Stephan Sauerburger <stephan@sauerburger.org>