hi-
pardon my noobieness...
i'm having some trouble with the syntax for awking the contents of of a variable in a script.
i have a variable (let's say $foo) whose contents is:
one two three
how can i assign a new variable ($bar) the value of "three"?
by comparison, if the variable were instead a file named "foo" with the same contents, then
awk '/one/{print $3}' foo
gives me:
three
so again, how do i make awk look at the contents of a script variable rather than a file?
-thanks!
-rev6