home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume22
/
gawk2.11
/
part15
/
gawk.texinfo.07
< prev
next >
Wrap
Text File
|
1990-06-07
|
7KB
|
180 lines
Concatenating two strings means sticking them together, one after another,
giving a new string. For example, the string @samp{foo} concatenated with
the string @samp{bar} gives the string @samp{foobar}.
@xref{Concatenation}.@refill
@item Conditional Expression
An expression using the @samp{?:} ternary operator, such as
@code{@var{expr1} ? @var{expr2} : @var{expr3}}. The expression
@var{expr1} is evaluated; if the result is true, the value of the whole
expression is the value of @var{expr2} otherwise the value is
@var{expr3}. In either case, only one of @var{expr2} and @var{expr3}
is evaluated. @xref{Conditional Exp}.@refill
@item Constant Regular Expression
A constant regular expression is a regular expression written within
slashes, such as @samp{/foo/}. This regular expression is chosen
when you write the @code{awk} program, and cannot be changed doing
its execution. @xref{Regexp Usage}.
@item Comparison Expression
A relation that is either true or false, such as @code{(a < b)}.
Comparison expressions are used in @code{if} and @code{while} statements,
and in patterns to select which input records to process.
@xref{Comparison Ops}.@refill
@item Curly Braces
The characters @samp{@{} and @samp{@}}. Curly braces are used in
@code{awk} for delimiting actions, compound statements, and function
bodies.@refill
@item Data Objects
These are numbers and strings of characters. Numbers are converted into
strings and vice versa, as needed. @xref{Conversion}.@refill
@item Dynamic Regular Expression
A dynamic regular expression is a regular expression written as an
ordinary expression. It could be a string constant, such as
@code{"foo"}, but it may also be an expression whose value may vary.
@xref{Regexp Usage}.
@item Escape Sequences
A special sequence of characters used for describing nonprinting
characters, such as @samp{\n} for newline, or @samp{\033} for the ASCII
ESC (escape) character. @xref{Constants}.
@item Field
When @code{awk} reads an input record, it splits the record into pieces
separated by whitespace (or by a separator regexp which you can
change by setting the built-in variable @code{FS}). Such pieces are
called fields. @xref{Records}.@refill
@item Format
Format strings are used to control the appearance of output in the
@code{printf} statement. Also, data conversions from numbers to strings
are controlled by the format string contained in the built-in variable
@code{OFMT}. @xref{Control Letters}; also @pxref{Output Separators}.@refill
@item Function
A specialized group of statements often used to encapsulate general
or program-specific tasks. @code{awk} has a number of built-in
functions, and also allows you to define your own. @xref{Built-in};
also @pxref{User-defined}.
@item @code{gawk}
The GNU implementation of @code{awk}.
@item Input Record
A single chunk of data read in by @code{awk}. Usually, an @code{awk} input
record consists of one line of text. @xref{Records}.@refill
@item Keyword
In the @code{awk} language, a keyword is a word that has special
meaning. Keywords are reserved and may not be used as variable names.
The keywords of @code{awk} are:
@code{if},
@code{else},
@code{while},
@code{do@dots{}while},
@code{for},
@code{for@dots{}in},
@code{break},
@code{continue},
@code{delete},
@code{next},
@code{function},
@code{func},
and @code{exit}.@refill
@item Lvalue
An expression that can appear on the left side of an assignment
operator. In most languages, lvalues can be variables or array
elements. In @code{awk}, a field designator can also be used as an
lvalue.@refill
@item Number
A numeric valued data object. The @code{gawk} implementation uses double
precision floating point to represent numbers.@refill
@item Pattern
Patterns tell @code{awk} which input records are interesting to which
rules.
A pattern is an arbitrary conditional expression against which input is
tested. If the condition is satisfied, the pattern is said to @dfn{match}
the input record. A typical pattern might compare the input record against
a regular expression. @xref{Patterns}.@refill
@item Range (of input lines)
A sequence of consecutive lines from the input file. A pattern
can specify ranges of input lines for @code{awk} to process, or it can
specify single lines. @xref{Patterns}.@refill
@item Recursion
When a function calls itself, either directly or indirectly.
If this isn't clear, refer to the entry for ``recursion''.
@item Redirection
Redirection means performing input from other than the standard input
stream, or output to other than the standard output stream.
You can redirect the output of the @code{print} and @code{printf} statements
to a file or a system command, using the @samp{>}, @samp{>>}, and @samp{|}
operators. You can redirect input to the @code{getline} statement using
the @samp{<} and @samp{|} operators. @xref{Redirection}.@refill
@item Regular Expression
See ``regexp''.
@item Regexp
Short for @dfn{regular expression}. A regexp is a pattern that denotes a
set of strings, possibly an infinite set. For example, the regexp
@samp{R.*xp} matches any string starting with the letter @samp{R}
and ending with the letters @samp{xp}. In @code{awk}, regexps are
used in patterns and in conditional expressions. Regexps may contain
escape sequences. @xref{Regexp}.@refill
@item Rule
A segment of an @code{awk} program, that specifies how to process single
input records. A rule consists of a @dfn{pattern} and an @dfn{action}.
@code{awk} reads an input record; then, for each rule, if the input record
satisfies the rule's pattern, @code{awk} executes the rule's action.
Otherwise, the rule does nothing for that input record.@refill
@item Side Effect
A side effect occurs when an expression has an effect aside from merely
producing a value. Assignment expressions, increment expressions and
function calls have side effects. @xref{Assignment Ops}.
@item Special File
A file name interpreted internally by @code{gawk}, instead of being handed
directly to the underlying operating system. For example, @file{/dev/stdin}.
@xref{Special Files}.
@item Stream Editor
A program that reads records from an input stream and processes them one
or more at a time. This is in contrast with batch programs, which may
expect to read their input files in entirety before starting to do
anything, and with interactive programs, which require input from the
user.@refill
@item String
A datum consisting of a sequence of characters, such as @samp{I am a
string}. Constant strings are written with double-quotes in the
@code{awk} language, and may contain @dfn{escape sequences}.
@xref{Constants}.
@item Whitespace
A sequence of blank or tab characters occurring inside an input record or a
string.@refill
@end table
@node Index, , Glossary, Top
@unnumbered Index
@printindex cp
@summarycontents
@contents
@bye