This example program outputs the words "hello world" to the terminal: {{{ awk # Hello World BEGIN { print "Hello World!" exit } }}} The program consists of the following elements: === Comment Block In [[awk]], [[comment]]s are inserted by prefixing them with a [[crosshatch]] symbol. Any [[comment]]s are ignored by the [[awk]] interpreter, which ignores the [[hash]] symbol and any other characters that follow it until the end of the line: {{{ awk # This whole line is a comment and is ignored by the awk interpreter print 'Hello' # Comments after a hash sign are ignored }}} === Begin Blocks The [[BEGIN]] block is executed once only at the start of the program, before any records have been read, providing startup actions within the program. === Squiggly Brackets The contents of the begin function is enclosed in [[brace]]s. This defines the boundaries of the [[block]] of code that the [[function]] contains. === The print statement The first [[statement]] within the [[main]] function calls the [[print]] statement with a [[string]] of [[character]]s, which are output to the screen.
Summary:
This change is a minor edit.
Username: