• awk script problem

    From Robert Peirce@21:1/5 to All on Tue Dec 17 14:39:54 2019
    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 "/ /".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bo Lindbergh@21:1/5 to All on Wed Dec 18 15:31:35 2019
    Lose the outermost {}.

    /Bo Lindbergh

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Peirce@21:1/5 to Bo Lindbergh on Sat Dec 21 08:48:52 2019
    On 12/18/19 9:31 AM, Bo Lindbergh wrote:
    Lose the outermost {}.

    /Bo Lindbergh

    Thanks. Missed that. It has been a while!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)