start page | rating of books | rating of authors | reviews | copyrights

Linux in a NutshellLinux in a NutshellSearch this book

13.3. gawk System Variables

Variable

Description

$n

nth field in current record; fields are separated by FS

$0

Entire input record

ARGC

Number of arguments on command line

ARGIND

Current file's place in command line (starting with 0)

ARGV

An array containing the command-line arguments

CONVFMT

Conversion format for numbers (default is %.6g)

ENVIRON

An associative array of environment variables

ERRNO

Description of last system error

FIELDWIDTHS

List of field widths (whitespace-separated)

FILENAME

Current filename

FNR

Like NR, but relative to the current file

FS

Field separator (default is any whitespace; null string separates into individual characters)

IGNORECASE

If true, make case-insensitive matches

LINT

If true, run as if -W lint had been specified on the command line; if value is FATAL, generate fatal errors

NF

Number of fields in current record

NR

Number of the current record

OFMT

Output format for numbers (default is %.6g)

OFS

Output field separator (default is a blank)

ORS

Output record separator (default is a newline)

RLENGTH

Length of the string matched by match function

RS

Record separator (default is a newline)

RT

The input text matching the record separator (RS) for the current record

RSTART

First position in the string matched by match function

SUBSEP

Separator character for array subscripts (default is \034)



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.