awk1page
an awk program is a series of //pattern { actions }// statements;\\ ie if the input line matchs pattern . . . Lines are split into fields separated by whitespace - $1 is the first field; $2 the second ...\\ . . .
2K - last updated 2012-03-18 22:22 UTC by g0pher
AwkGuide
** Work in Progress ** {{{ import from Mark Hobley's wiki }}} <toc> ---- == Overview * [[Overview]] . . . [[variable substitution]] * [[while]] loops * [[whitespace]] == Conversion of scripts to suit different . . .
4K - last updated 2011-08-14 15:57 UTC by markhobley
comment
Comments are pieces of text or [[whitespace]] that can be included in a program to make the code more . . .
1K - last updated 2009-07-15 17:07 UTC by MarkHobley
concatenation
== The awk programming language does not have an explicit concatenation operator == The awk programming . . . of [[numeric]] values will occur if [[whitespace]] is used between them: {{{ awk # This will . . .
1K - last updated 2011-06-25 05:13 UTC by pgas
continuation
Line continuation enables long lines of code to split across several lines for the purpose of making . . . regular expression # /foo\ # bar/ { print $1 } # Whitespace is the best place to split a line /foobar . . .
1K - last updated 2011-05-09 22:48 UTC by markhobley
FS
= Field Separator = The [[special variable]] FS is a field separator that is used to determine how [[awk]] . . . files, fields are often separated by multiple whitespace characters, rather than a single space. . . . space separator as matching any stretch of whitespace. This prevents two consectutive spaces from . . . print l ":" $l }' }}} == Leading and trailing whitespace == When the default single space field separator . . . awk interpreter strips leading and and trailing whitespace is stripped from the record, before it is . . .
5K - last updated 2013-02-19 21:45 UTC by markhobley
limitation
== Limitations of awk Some traditional versions of [[awk]] derived from [[Unix]] version 7, may not conform . . . have the following operational limitations: === Whitespace is not allowed before the opening parenthesis . . .
1K - last updated 2009-04-20 15:50 UTC by Mark Hobley
RangeOfFields
Printing a range of fields - all fields but the first, for examples, or fields 3 through 8 - is a surprisingly . . . from the end of the last field (meaning that any whitespace is included). It then uses printf to space-pad . . . that length, therefore preserving the original whitespace. It works best when the fields are separated . . .
10K - last updated 2015-09-08 09:52 UTC by pgas
RS
= Record Separator = The [[special variable]] RS is a record separator that is used to determine how . . . considered a record separator. Lines containing whitespace will be treated as part of a record and . . .
3K - last updated 2013-02-19 23:11 UTC by markhobley
string manipulation
* [[case conversion]] * [[length|Determine the length of a string]] * [[index|Determine the position . . . a string at arbitary positions]] * Strip whitespace from a string * Strip control codes and . . .
1K - last updated 2011-07-04 22:12 UTC by markhobley
whitespace
== _Line breaks are best placed at whitespace points_ The [[awk]] extraction and reporting language is . . . or following squiggly [[braces]], where whitespace would typically be placed: {{{ # It is best . . . to split a line at whitespace points /foobar/ \ { print $1 } }}} . . .
1K - last updated 2011-03-20 22:07 UTC by markhobley
11 pages found.