AwkGuide
** Work in Progress ** {{{ import from Mark Hobley's wiki }}} <toc> ---- == Overview * [[Overview]] . . . * [[goto]] * [[grouping arguments]] * [[hashbang]] * [[hash]] symbol * [[here document]]s * . . .
4K - last updated 2011-08-14 15:57 UTC by markhobley
Features of awk
The [[awk]] utility: * treats lines of a text as database records, which can be divided into fields. . . . [[assignment]]s from a single statement * the [[hashbang]] mechanism requires a switch in order to . . .
1K - last updated 2011-05-27 15:33 UTC by markhobley
hashbang
== A script can be treated as an executable file by using a hashbang == It is possible for an awk script . . . be treated as an executable file by including a hashbang line as the first line of the script. === . . . The hashbang needs a switch === Because of the way that . . . to include a -f command line switch on the hashbang line. This enables the system to run the awk . . . the appropriate command line for the script. The hashbang line should read as follows: {{{ #!/usr/bin/awk . . .
1K - last updated 2010-11-28 19:04 UTC by markhobley
include
The [[awk]] extraction and reporting language does not support the use of include files. However, it . . . should not be more than one filename on the hashbang line_ It is not permissible to pass the name . . . of additional source files through a hashbang line, because there should not be more than . . . one parameter on the hashbang line after the interpreter name. The following . . . hashbang line will not work: {{{ #!/usr/bin/awk -f . . .
2K - last updated 2013-03-30 10:38 UTC by markhobley
Invoking an awk program
=== Throwaway one-liners It is often useful to type a simple program at the command line for use within . . . sh awk -f foobar.awk }}} === Using a shebang (hashbang) As with other Unix scripts, an [[awk]] script . . . can be started using a [[hashbang]]. However, because of the syntax of the [[awk]] . . . is necessary to include a the -f switch in the [[hashbang]] line as follows: {{{ sh #!/usr/bin/awk -f . . .
1K - last updated 2008-12-31 11:34 UTC by pgas
Overview
= Overview of awk = == The primarily purpose of awk is to processing textual data to produce formatted . . . * [[rule]]s * [[function]] definitions * [[hashbang]] == The awk utility performs a cycle of pattern . . .
4K - last updated 2011-05-23 23:09 UTC by markhobley
6 pages found.