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

[OT] bash/awk question



I just ran into this shell scripting problem again where I have 
some lines of text and would like to perform an action on each
line. For example, I have a do...while loop (a few lines of
/bin/sh), and I would like to have the body executed for each
line of a given file / stream. 
I understand the correct way to do this is probably awk, 
but not sure how to make it work in this case. For example, I
could put the code in a bash function, but then how do I
access the function from inside the awk command? The key thing
here is that my /bin/sh code has variables which I would like
to read/write from inside the loop. 
-chris




Reply to: