[lug] bash - awk - command substitution - for loop

karl horlen horlenkarl at yahoo.com
Wed Nov 7 00:32:09 MST 2007


> However, the one thing you might want to try is to
> rearrange the loop:
> 
> awk '{print $0}' access_log  | sort | while read i
> do 
> echo $i
> done

Not sure why that makes a difference but it worked
like a charm! Thanks.

If anybody knows how to eliminate the spaces from my
command substitution example, I'd still like to know
how or why it doesn't work.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the LUG mailing list