[BACK]Return to awk.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / awk

Diff for /src/usr.bin/awk/awk.1 between version 1.46 and 1.47

version 1.46, 2020/01/22 03:47:38 version 1.47, 2020/06/10 21:00:01
Line 162 
Line 162 
 option with a value of  option with a value of
 .Sq [t] .  .Sq [t] .
 .Pp  .Pp
 A pattern-action statement has the form  A pattern-action statement has the form:
 .Pp  .Pp
 .D1 Ar pattern Ic \&{ Ar action Ic \&}  .D1 Ar pattern Ic \&{ Ar action Ic \&}
 .Pp  .Pp
Line 288 
Line 288 
 .Ic print  .Ic print
 statement prints its arguments on the standard output  statement prints its arguments on the standard output
 (or on a file if  (or on a file if
 .Pf > Ar file  .Pf >\ \& Ar file
 or  or
 .Pf >> Ar file  .Pf >>\ \& Ar file
 is present or on a pipe if  is present or on a pipe if
 .Pf |\ \& Ar cmd  .Pf |\ \& Ar cmd
 is present), separated by the current output field separator,  is present), separated by the current output field separator,
Line 303 
Line 303 
 the same open file.  the same open file.
 The  The
 .Ic printf  .Ic printf
 statement formats its expression list according to the format  statement formats its expression list according to the
   .Ar format
 (see  (see
 .Xr printf 1 ) .  .Xr printf 1 ) .
 .Pp  .Pp
Line 373 
Line 374 
 and  and
 .Ic END  .Ic END
 do not combine with other patterns.  do not combine with other patterns.
   They may appear multiple times in a program and execute
   in the order they are read by
   .Nm .
 .Pp  .Pp
 Variable names with special meanings:  Variable names with special meanings:
 .Pp  .Pp
Line 502 
Line 506 
 The length of  The length of
 .Fa s  .Fa s
 taken as a string,  taken as a string,
 or of  number of elements in an array for an array argument,
   or length of
 .Va $0  .Va $0
 if no argument is given.  if no argument is given.
 .It Fn match s r  .It Fn match s r
Line 658 
Line 663 
 returns 1 for a successful input, 0 for end of file, and \-1 for an error.  returns 1 for a successful input, 0 for end of file, and \-1 for an error.
 .It Xo  .It Xo
 .Ic getline Op Va var  .Ic getline Op Va var
 .Pf \ \&< Ar file  .Pf <\ \& Ar file
 .Xc  .Xc
 Sets  Sets
 .Va $0  .Va $0
Line 687 
Line 692 
 Executes  Executes
 .Fa cmd  .Fa cmd
 and returns its exit status.  and returns its exit status.
   This will be \-1 upon error,
   .Ar cmd Ns 's
   exit status upon a normal exit,
   256 +
   .Em sig
   if
   .Fa cmd
   was terminated by a signal, where
   .Em sig
   is the number of the signal,
   or 512 +
   .Em sig
   if there was a core dump.
 .El  .El
 .Ss Bit-Operation Functions  .Ss Bit-Operation Functions
 .Bl -tag -width "lshift(a, b)"  .Bl -tag -width "lshift(a, b)"
Line 718 
Line 736 
 .Pp  .Pp
 .Dl { print $2, $1 }  .Dl { print $2, $1 }
 .Pp  .Pp
 Same, with input fields separated by comma and/or blanks and tabs:  Same, with input fields separated by comma and/or spaces and tabs:
 .Bd -literal -offset indent  .Bd -literal -offset indent
 BEGIN { FS = ",[ \et]*|[ \et]+" }  BEGIN { FS = ",[ \et]*|[ \et]+" }
       { print $2, $1 }        { print $2, $1 }
Line 749 
Line 767 
 .Ed  .Ed
 .Sh SEE ALSO  .Sh SEE ALSO
 .Xr cut 1 ,  .Xr cut 1 ,
   .Xr grep 1 ,
 .Xr lex 1 ,  .Xr lex 1 ,
 .Xr printf 1 ,  .Xr printf 1 ,
 .Xr sed 1 ,  .Xr sed 1 ,
Line 795 
Line 814 
 .Pp  .Pp
 The scope rules for variables in functions are a botch;  The scope rules for variables in functions are a botch;
 the syntax is worse.  the syntax is worse.
   .Pp
   POSIX-standard interval expressions in regular expressions are not supported.
   .Pp
   Only eight-bit character sets are handled correctly.

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47