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

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:



Colin Watson                                  [cjwatson@flatline.org.uk]

Reply to: