A Crash Course In AWK

Discussion in 'all things UNIX' started by lotuseclat79, Oct 20, 2013.

Thread Status:
Not open for further replies.
  1. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,390
    A Crash Course In AWK.

    I use nawk (in most Linux distributions) instead of awk, and I highly recommend you learn how to pass an argument into (n)awk from a shell script using: -v x=arg1 -v y=arg2 where x and y are internal to the awk program and arg1 and arg2 are values from a shell script value, e.g. $var1 and $var2. Each argument passed into the (n)awk program requires a -v to precede it for as many args as you pass into the (n)awk program from the shell script.

    -- Tom
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.