Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

awk script problem

4 views
Skip to first unread message

Robert Peirce

unread,
Dec 17, 2019, 2:39:56 PM12/17/19
to
I'm way out of practice but I'm trying to scroll through a text file and
print any line that contains "Location". This ought to work but
doesn't. I'm missing something really basic!

awk '{
/*Location*/ { print }
}' IN > OUT

the "{" in "{ print }" produces a syntax error. It does this no matter
what is in "/ /".

Bo Lindbergh

unread,
Dec 18, 2019, 9:31:37 AM12/18/19
to
Lose the outermost {}.

/Bo Lindbergh

Robert Peirce

unread,
Dec 21, 2019, 8:48:57 AM12/21/19
to
On 12/18/19 9:31 AM, Bo Lindbergh wrote:
> Lose the outermost {}.
>
> /Bo Lindbergh
>
Thanks. Missed that. It has been a while!
0 new messages