Provided by: manpages-ja_0.5.0.0.20100315-1_all bug

AWK

       AWK ()

              pattern   { action statements }
              function name(parameter list) { statements }

       gawk program-file () --source -f --source gawk program-file  AWK AWK

        AWKPATH -f AWKPATH ".:/usr/local/share/awk" ( gawk /) -f  "/"

       gawk  AWK -v () BEGIN  () ARGV  ( )

        var=val var val ( BEGIN ) AWK 1

        ARGV  ("") gawk

       gawk   AWK

        gawk  () END  ()

       AWK AWK 1

        RS RS RS RS RS FS

        gawk  FS FS 1 FS FS FS ( --posix ) IGNORECASE () FS RS

        FIELDWIDTHS gawk FS FS FIELDWIDTHS

        $1, $2 $0  5

              n = 5
              print $n

        NF

        ( $NF ) ( $(NF+2)=5 ) NF $0 OFS NF $0 OFS

       gawk

       ARGC         ( gawk )

       ARGIND       ARGV

       ARGV         0 ARGC - 1 ARGV

       CONVFMT      "%.6g"

       ENVIRON       ( ENVIRON["HOME"] /home/arnold ) gawk system() ( gawk )

       ERRNO       getline getline close() ERRNO

       FIELDWIDTHS  gawk FS gawk

       FILENAME     FILENAME  "-" BEGIN FILENAME

       FNR

       FS

       IGNORECASE    IGNORECASE   0  FS  RS  ~  !~  gensub(), gsub(), index(),
                   match(), split(), sub() IGNORECASE   0  /aB/   "ab",  "aB",
                   "Ab",  "AB" AWK IGNORECASE  0 Unix ISO 8859-1 Latin-1 : 3.0
                   gawk IGNORECASE

       NF

       NR

       OFMT         "%.6g"

       OFS

       ORS

       RS

       RT           gawk RS RT

       RSTART      match() 0

       RLENGTH     match() -1

       SUBSEP        "\034"

        ([ ]) (,  ...)  SUBSEP

              i = "A"; j = "B"; k = "C"
              x[i, j, k] = "hello, world\n"

        "hello, world\n"  "A\034B\034C"  x AWK

        in if while

              if (val in array)
                   print array[val]

        (i, j) in array

       in for

        delete delete

       ()

        0

        atof(3) CONVFMT sprintf(3) AWK

              CONVFMT = "%2.2f"
              a = 12
              b = a ""

        b  "12" "12.00"

       gawk : 2 `' POSIX gawk

       "57"  getline FILENAME ARGV ENVIRON split()

        0  "" ()

       awk { }

              { print }

        "#" : ",", {, ?, :, &&, || do else  "\"

       ";" 1 () - -
        ";"

       AWK

              BEGIN
              END
              /regular expression/
              relational expression
              pattern && pattern
              pattern || pattern
              pattern ? pattern : pattern
              (pattern)
              ! pattern
              pattern1, pattern2

       BEGIN END BEGIN BEGIN END  (exit ) BEGIN END BEGIN END

       /regular expression/  (regular expression) egrep(1)

       (relational expression)

        &&, ||, !   C ANDORNOT C

       ?:  C  2  3 2  3

       pattern1, pattern2  pattern1 pattern2

       awk egrep

       c           c

       \c          c

       .             1

       ^

       $

       [abc...]    abc...   1

       [^abc...]   abc...   1

       r1|r2      : r1 r2

       r1r2       : r1 r2

       r+         r  1

       r*         r  0

       r?         r  0  1

       (r)        : r

       r{n}
       r{n,}
       r{n,m}      1  2   1 r n 2 r n m 1 r n
                   --posix --re-interval

       \y

       \B

       \<

       \>

       \w          ()

       \W

       \`          ()

       \'

        ()

         POSIX

        [: :]  POSIX

       [:alnum:]

       [:alpha:]

       [:blank:]

       [:cntrl:]

       [:digit:]

       [:graph:]
               ( a )

       [:lower:]

       [:print:]
               ()

       [:punct:]
               ()

       [:space:]
               ()

       [:upper:]

       [:xdigit:]
              16

       POSIX /[A-Za-z0-9]/ POSIX /[[:alnum:]]/

        2  (  )   ASCII ( "e"  e` )

               [.  .]  ch [[.ch.]]  [ch] c h

               [= =] e  "e," "e`,", "e`."  [[=e=]] e, e', e`

        gawk  POSIX

       \y, \B, \<, \>, \w, \W, \`, \' gawk GNU

        gawk

               gawk  POSIX  GNU

       --posix
              POSIX GNU ( \w w )

       --traditional
               Unix awk GNU POSIX  ( [[:alnum:]] ) 8  16

       --re-interval
              --traditional

        { }  C

       AWK

       (...)

       $

       ++ --

       ^            (**  **= )

       + - !

       * / %

       + -

       space

       < >
       <= >=
       != ==

       ~ !~         : ~ !~ (/foo/) /foo/ ~ exp (($0 ~ /foo/) ~ exp)

       in

       &&           AND

       ||           OR

       ?:          C expr1 ? expr2 : expr3 expr1 expr2 expr3 expr2 expr3

       = += -=
       *= /= %= ^=  (var = value)  ()

              if (condition) statement [ else statement ]
              while (condition) statement
              do statement while (condition)
              for (expr1; expr2; expr3) statement
              for (var in array) statement
              break
              continue
              delete array[index]
              delete array
              exit [ expression ]
              { statements }

       close(file)
                  ()
       getline    $0 NF, NR, FNR
       getline <file
                  file $0 NF
       getline var
                  var NR, FNR
       getline var <file
                  file var
       next      AWK C  continue END
       nextfile   FILENAME ARGIND FNR  1 AWK END :  gawk next file  2
       print      ORS
       print expr-list
                  OFS ORS
       print expr-list >file
                  file OFS ORS
       printf fmt, expr-list

       printf fmt, expr-list >file
                  file
       system(cmd-line)
                  cmd-line  (POSIX )
       fflush([file])
                  file file file
        print printf >> file file | command command| getline  getline  getline
       0  -1
       : getline print printf close()  EOF AWK
   printf
       AWK printf sprintf()  ()
       %c     1  ASCII %c  ASCII  1
       %d
       %i     10  ()
       %e
       %E     [-]d.dddddde[+-]dd %E e E

       %f     [-]ddd.dddddd

       %g
       %G     %e %f  0 %G %e %E

       %o      8  ()

       %u      10  ()

       %s

       %x
       %X      16  () %X abcdef ABCDEF

       %%      %

       %

       -

       +       () +

       #       %o  0 %x %X  0 0x 0X %e, %E, %f %g, %G  0

       0       0 ()  0

       width   width 0  0

       .prec   %e, %E, %f %g, %G %d, %o, %i, %u, %x, %X

       ANSI C printf() width prec   * printf sprintf()

       print printf getline gawk  () gawk

       /dev/pid    ID (10 )

       /dev/ppid   ID (10 )

       /dev/pgrpid  ID (10 )

       /dev/user     $1  getuid(2)  $2  geteuid(2)  $3 getgid(2) $4 getegid(2)
                   getgroups(2)  ID

       /dev/stdin

       /dev/stdout

       /dev/stderr

       /dev/fd/n    n

              print "You blew it!" > "/dev/stderr"

              print "You blew it!" | "cat 1>&2"

       AWK

       atan2(y, x)   y/x

       cos(expr)     expr

       exp(expr)

       int(expr)

       log(expr)

       rand()        0  1

       sin(expr)     expr

       sqrt(expr)

       srand([expr]) expr

       gawk

       gensub(r, s, h [, t])    t r h g G r s h r t $0 s \n n  1   9  n  \0  &
                               sub() gsub()

       gsub(r, s [, t])          t  r  s t $0 & \& & sub(), gsub(), gensub() &
                               Effective AWK Language Programming

       index(s, t)              s t t  0

       length([s])              s s $0

       match(s, r)              s r  0 RSTART RLENGTH

       split(s, a [, r])        s r a r FS a

       sprintf(fmt, expr-list)  fmt exp-list

       sub(r, s [, t])         gsub()

       substr(s, i [, n])       s i n n i

       tolower(str)             str

       toupper(str)             str

        AWK 1 gawk  2

       systime()  (POSIX  UTC  1970  1  1  0:00 )

       strftime([format [, timestamp]])
                   format  timestamp  timestamp  systime()  timestamp   format
                 date(1) ANSI C strftime() strftime(3) gawk gawk strftime gawk

       AWK  (") C

       \\

       \a    ASCII BEL

       \b

       \f    ()

       \n

       \r    ()

       \t

       \v

       \xhex digits
            \x  16 ANSI C \x  16 () "\x1B" ASCII ESC ()

       \ddd 1  2  3  8  "\033" ASCII ESC ()

       \c    c

        ( /[ \t\f\n\r\v]/ )

       8  16 /a\52b/ /a\*b/

       AWK

              function name(parameter list) { statements }

        AWK

              function  f(p, q,     a, b)   # a & b
              {
                   ...
              }

              /abc/     { ... ; f(1, 2) ; ... }

         0

        return expr  "" (: )

       --lint gawk

       function func

       "/etc/passwd"

            BEGIN     { FS = ":" }
                 { print $1 | "sort" }

                 { nlines++ }
            END  { print nlines }

            { print FNR, $0 }

            { print NR, $0 }

       egrep(1),  getpid(2),  getppid(2),  getpgrp(2),  getuid(2), geteuid(2),
       getgid(2), getegid(2), getgroups(2)

       The AWK Programming Language, Alfred V. Aho, Brian W. Kernighan,  Peter
       J. Weinberger, Addison-Wesley, 1988. ISBN 0-201-07981-X.

       Effective  AWK Language Programming, Edition 1.0, published by the Free
       Software Foundation, 1995.

POSIX

       gawk  UNIX awk POSIX gawk  AWK Bell Labs  POSIX awk

        -v AWK awk BEGIN BEGIN  awk ( AT&T  GNU )

        -W  POSIX

        "--" gawk  AWK

       AWK srand() POSIX gawk srand()

        -f  (MKS awk); ENVIRON ; \a \v ( gawk AT&T awk ); tolower()  toupper()
       (AT&T ); printf  ANSI C (AT&T )

GNU

       gawk  POSIX awk --traditional gawk

       gawk POSIX awk

              o  \x ( --posix )

              o fflush() ( --posix )

              o systime(), strftime(), gensub()

              o

              o  ARGIND, ERRNO, RT

              o  IGNORECASE

              o  FIELDWIDTHS

              o RS

              o FS split()  3

              o -f AWKPATH

              o  nextfile

              o  delete

       AWK close() gawk close() fclose(3) pclose(3)

        --traditional gawk -F fs  "t" FS gawk -F\t ...   "t" "\t" -F --posix :
       gawk -F'\t' ....

       gawk  AWK  2 1 length() !

              a = length     # Holy Algol 60, Batman!

       2

              a = length()
              a = length($0)

       POSIX  "deprecated" gawk --lint

        1 while, for, do continue, break  AWK continue next gawk --traditional

        POSIXLY_CORRECT gawk --posix --lint gawk

       AWKPATH gawk -f --file

        -F awk

        /dev/fd /dev/stdin, /dev/stdout,  /dev/stderr  gawk  gawk  /dev/stdout
       (Caveat Emptor)

        gawk  3.0.6

       UNIX  awk  AT&T Bell Labs  Alfred Aho Peter Weinberger  Brian Kernighan
       Brian Kernighan

       Free Software Foundation  Paul Rubin  Jay Fenlason Seventh Edition UNIX
       awk gawk John Woods David Trueman Arnold Robbins gawk  UNIX awk

       DOS   Conrad  Kwok   Scott Garfinkle  Scott Deifik  DOS Pat Rankin  VMS
       Michal Jaegermann  Atari ST OS/2  Kai Uwe Rommel  Darrel Hankerson Fred
       Fish  Amiga

       gawk bug-gawk@gnu.org gawk  C

        2  1 gawk  ()  2

        comp.lang.awk gawk

       Bell Labs  Brian Kernighan

COPYING PERMISSIONS

       Copyright (C) 1996-2000 Free Software Foundation, Inc.

       Permission  is  granted  to make and distribute verbatim copies of this
       manual page provided the copyright notice and  this  permission  notice
       are preserved on all copies.

       Permission  is granted to copy and distribute modified versions of this
       manual page under the conditions for verbatim  copying,  provided  that
       the  entire  resulting derived work is distributed under the terms of a
       permission notice identical to this one.

       Permission is granted to  copy  and  distribute  translations  of  this
       manual  page  into  another  language,  under  the above conditions for
       modified versions, except that this permission notice may be stated  in
       a translation approved by the Foundation.