Glossary
Glossary
- Action
-
A series of
awkstatements attached to a rule. If the rule's pattern matches an input record,awkexecutes the rule's action. Actions are always enclosed in curly braces. See section Overview of Actions. - Amazing
awkAssembler -
Henry Spencer at the University of Toronto wrote a retargetable assembler
completely as
awkscripts. It is thousands of lines long, including machine descriptions for several eight-bit microcomputers. It is a good example of a program that would have been better written in another language. - Amazingly Workable Formatter (
awf) -
Henry Spencer at the University of Toronto wrote a formatter that accepts
a large subset of the `nroff -ms' and `nroff -man' formatting
commands, using
awkandsh. - ANSI
- The American National Standards Institute. This organization produces many standards, among them the standards for the C and C++ programming languages.
- Assignment
-
An
awkexpression that changes the value of someawkvariable or data object. An object that you can assign to is called an lvalue. The assigned values are called rvalues. See section Assignment Expressions. awkLanguage-
The language in which
awkprograms are written. awkProgram-
An
awkprogram consists of a series of patterns and actions, collectively known as rules. For each input record given to the program, the program's rules are all processed in turn.awkprograms may also contain function definitions. awkScript-
Another name for an
awkprogram. - Bash
- The GNU version of the standard shell (the Bourne-Again shell). See "Bourne Shell."
- BBS
- See "Bulletin Board System."
- Boolean Expression
- Named after the English mathematician Boole. See "Logical Expression."
- Bourne Shell
-
The standard shell (`/bin/sh') on Unix and Unix-like systems,
originally written by Steven R. Bourne.
Many shells (Bash,
ksh,pdksh,zsh) are generally upwardly compatible with the Bourne shell. - Built-in Function
-
The
awklanguage provides built-in functions that perform various numerical, time stamp related, and string computations. Examples aresqrt(for the square root of a number) andsubstr(for a substring of a string). See section Built-in Functions. - Built-in Variable
-
ARGC,ARGIND,ARGV,CONVFMT,ENVIRON,ERRNO,FIELDWIDTHS,FILENAME,FNR,FS,IGNORECASE,NF,NR,OFMT,OFS,ORS,RLENGTH,RSTART,RS,RT, andSUBSEP, are the variables that have special meaning toawk. Changing some of them affectsawk's running environment. Several of these variables are specific togawk. See section Built-in Variables. - Braces
- See "Curly Braces."
- Bulletin Board System
- A computer system allowing users to log in and read and/or leave messages for other users of the system, much like leaving paper notes on a bulletin board.
- C
-
The system programming language that most GNU software is written in. The
awkprogramming language has C-like syntax, and this book points out similarities betweenawkand C when appropriate. - Character Set
- The set of numeric codes used by a computer system to represent the characters (letters, numbers, punctuation, etc.) of a particular country or place. The most common character set in use today is ASCII (American Standard Code for Information Interchange). Many European countries use an extension of ASCII known as ISO-8859-1 (ISO Latin-1).
- CHEM
-
A preprocessor for
picthat reads descriptions of molecules and producespicinput for drawing them. It was written inawkby Brian Kernighan and Jon Bentley, and is available fromnetlib@research.att.com. - Compound Statement
-
A series of
awkstatements, enclosed in curly braces. Compound statements may be nested. See section Control Statements in Actions. - Concatenation
- Concatenating two strings means sticking them together, one after another, giving a new string. For example, the string `foo' concatenated with the string `bar' gives the string `foobar'. See section String Concatenation.
- Conditional Expression
- An expression using the `?:' ternary operator, such as `expr1 ? expr2 : expr3'. The expression expr1 is evaluated; if the result is true, the value of the whole expression is the value of expr2, otherwise the value is expr3. In either case, only one of expr2 and expr3 is evaluated. See section Conditional Expressions.
- Comparison Expression
-
A relation that is either true or false, such as `(a < b)'.
Comparison expressions are used in
if,while,do, andforstatements, and in patterns to select which input records to process. See section Variable Typing and Comparison Expressions. - Curly Braces
-
The characters `{' and `}'. Curly braces are used in
awkfor delimiting actions, compound statements, and function bodies. - Dark Corner
- An area in the language where specifications often were (or still are) not clear, leading to unexpected or undesirable behavior. Such areas are marked in this book with "(d.c.)" in the text, and are indexed under the heading "dark corner."
- Data Objects
- These are numbers and strings of characters. Numbers are converted into strings and vice versa, as needed. See section Conversion of Strings and Numbers.
- Double Precision
-
An internal representation of numbers that can have fractional parts.
Double precision numbers keep track of more digits than do single precision
numbers, but operations on them are more expensive. This is the way
awkstores numeric values. It is the C typedouble. - Dynamic Regular Expression
-
A dynamic regular expression is a regular expression written as an
ordinary expression. It could be a string constant, such as
"foo", but it may also be an expression whose value can vary. See section Using Dynamic Regexps. - Environment
-
A collection of strings, of the form name
=val, that each program has available to it. Users generally place values into the environment in order to provide information to various programs. Typical examples are the environment variablesHOMEandPATH. - Empty String
- See "Null String."
- Escape Sequences
- A special sequence of characters used for describing non-printing characters, such as `\n' for newline, or `\033' for the ASCII ESC (escape) character. See section Escape Sequences.
- Field
-
When
awkreads 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 variableFS). Such pieces are called fields. If the pieces are of fixed length, you can use the built-in variableFIELDWIDTHSto describe their lengths. See section Specifying How Fields are Separated, and also see See section Reading Fixed-width Data. - Floating Point Number
- Often referred to in mathematical terms as a "rational" number, this is just a number that can have a fractional part. See "Double Precision" and "Single Precision."
- Format
-
Format strings are used to control the appearance of output in the
printfstatement. Also, data conversions from numbers to strings are controlled by the format string contained in the built-in variableCONVFMT. See section Format-Control Letters. - Function
-
A specialized group of statements used to encapsulate general
or program-specific tasks.
awkhas a number of built-in functions, and also allows you to define your own. See section Built-in Functions, and section User-defined Functions. - FSF
- See "Free Software Foundation."
- Free Software Foundation
- A non-profit organization dedicated to the production and distribution of freely distributable software. It was founded by Richard M. Stallman, the author of the original Emacs editor. GNU Emacs is the most widely used version of Emacs today.
gawk-
The GNU implementation of
awk. - General Public License
-
This document describes the terms under which
gawkand its source code may be distributed. (see section GNU GENERAL PUBLIC LICENSE) - GNU
- "GNU's not Unix". An on-going project of the Free Software Foundation to create a complete, freely distributable, POSIX-compliant computing environment.
- GPL
- See "General Public License."
- Hexadecimal
-
Base 16 notation, where the digits are
0-9andA-F, with `A' representing 10, `B' representing 11, and so on up to `F' for 15. Hexadecimal numbers are written in C using a leading `0x', to indicate their base. Thus,0x12is 18 (one times 16 plus 2). - I/O
- Abbreviation for "Input/Output," the act of moving data into and/or out of a running program.
- Input Record
-
A single chunk of data read in by
awk. Usually, anawkinput record consists of one line of text. See section How Input is Split into Records. - Integer
- A whole number, i.e. a number that does not have a fractional part.
- Keyword
-
In the
awklanguage, a keyword is a word that has special meaning. Keywords are reserved and may not be used as variable names.gawk's keywords are:BEGIN,END,if,else,while,do...while,for,for...in,break,continue,delete,next,nextfile,function,func, andexit. - Logical Expression
-
An expression using the operators for logic, AND, OR, and NOT, written
`&&', `||', and `!' in
awk. Often called Boolean expressions, after the mathematician who pioneered this kind of mathematical logic. - 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
awk, a field designator can also be used as an lvalue. - Null String
-
A string with no characters in it. It is represented explicitly in
awkprograms by placing two double-quote characters next to each other (""). It can appear in input data by having two successive occurrences of the field separator appear next to each other. - Number
-
A numeric valued data object. The
gawkimplementation uses double precision floating point to represent numbers. Very oldawkimplementations use single precision floating point. - Octal
-
Base-eight notation, where the digits are
0-7. Octal numbers are written in C using a leading `0', to indicate their base. Thus,013is 11 (one times 8 plus 3). - Pattern
-
Patterns tell
awkwhich 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 match the input record. A typical pattern might compare the input record against a regular expression. See section Pattern Elements. - POSIX
-
The name for a series of standards being developed by the IEEE
that specify a Portable Operating System interface. The "IX" denotes
the Unix heritage of these standards. The main standard of interest for
awkusers is IEEE Standard for Information Technology, Standard 1003.2-1992, Portable Operating System Interface (POSIX) Part 2: Shell and Utilities. Informally, this standard is often referred to as simply "P1003.2." - Private
-
Variables and/or functions that are meant for use exclusively by library
functions, and not for the main
awkprogram. Special care must be taken when naming such variables and functions. See section Naming Library Function Global Variables. - Range (of input lines)
-
A sequence of consecutive lines from the input file. A pattern
can specify ranges of input lines for
awkto process, or it can specify single lines. See section Pattern Elements. - Recursion
- When a function calls itself, either directly or indirectly. If this isn't clear, refer to the entry for "recursion."
- 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
printandprintfstatements to a file or a system command, using the `>', `>>', and `|' operators. You can redirect input to thegetlinestatement using the `<' and `|' operators. See section Redirecting Output ofprintandprintf, and section Explicit Input withgetline. - Regexp
-
Short for regular expression. A regexp is a pattern that denotes a
set of strings, possibly an infinite set. For example, the regexp
`R.*xp' matches any string starting with the letter `R'
and ending with the letters `xp'. In
awk, regexps are used in patterns and in conditional expressions. Regexps may contain escape sequences. See section Regular Expressions. - Regular Expression
- See "regexp."
- Regular Expression Constant
-
A regular expression constant is a regular expression written within
slashes, such as
/foo/. This regular expression is chosen when you write theawkprogram, and cannot be changed doing its execution. See section How to Use Regular Expressions. - Rule
-
A segment of an
awkprogram that specifies how to process single input records. A rule consists of a pattern and an action.awkreads an input record; then, for each rule, if the input record satisfies the rule's pattern,awkexecutes the rule's action. Otherwise, the rule does nothing for that input record. - Rvalue
-
A value that can appear on the right side of an assignment operator.
In
awk, essentially every expression has a value. These values are rvalues. sed- See "Stream Editor."
- Short-Circuit
-
The nature of the
awklogical operators `&&' and `||'. If the value of the entire expression can be deduced from evaluating just the left-hand side of these operators, the right-hand side will not be evaluated (see section Boolean Expressions). - Side Effect
- A side effect occurs when an expression has an effect aside from merely producing a value. Assignment expressions, increment and decrement expressions and function calls have side effects. See section Assignment Expressions.
- Single Precision
-
An internal representation of numbers that can have fractional parts.
Single precision numbers keep track of fewer digits than do double precision
numbers, but operations on them are less expensive in terms of CPU time.
This is the type used by some very old versions of
awkto store numeric values. It is the C typefloat. - Space
- The character generated by hitting the space bar on the keyboard.
- Special File
-
A file name interpreted internally by
gawk, instead of being handed directly to the underlying operating system. For example, `/dev/stderr'. See section Special File Names ingawk. - 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.
- String
-
A datum consisting of a sequence of characters, such as `I am a
string'. Constant strings are written with double-quotes in the
awklanguage, and may contain escape sequences. See section Escape Sequences. - Tab
- The character generated by hitting the TAB key on the keyboard. It usually expands to up to eight spaces upon output.
- Unix
- A computer operating system originally developed in the early 1970's at AT&T Bell Laboratories. It initially became popular in universities around the world, and later moved into commercial evnironments as a software development system and network server system. There are many commercial versions of Unix, as well as several work-alike systems whose source code is freely available (such as Linux, NetBSD, and FreeBSD).
- Whitespace
- A sequence of space or tab characters occurring inside an input record or a string.
Glossary : micro annuaire
| cygwin | : | le compilateur gcc sous windows ainsi que tous les outils unix (awk, grep, sed, bash, ksh ...). |
| Youhp3 | : | Youpee est un preprocesseur HTML pour vous simplifier toutes les tâches répétitives dans la création d'un site web. Salemioche.net utilise trés largement ses possibilités. |
