Browse Definitions :
Definition

awk

awk (also written as Awk and AWK) is a utility that enables a programmer to write tiny but effective programs in the form of statements that define text patterns that are to be searched for in each line of a document and the action that is to be taken when a match is found within a line. awk comes with most UNIX-based operating systems such as Linux, and also with some other operating systems, such as Windows 95/98/NT.

An awk program is made up of patterns and actions to be performed when a pattern match is found. awk scans input lines sequentially and examines each one to determine whether it contains a pattern matching one specified by the user. When the matching pattern is found, awk carries out the instructions in the program. For example, awk could scan text for a critical portion and reformat the text contained in it according to the user's command. If no pattern is specified, the program will carry out the command on all of the input data.

awk breaks each line into fields, which are groups of characters with spaces acting as separators so that a word, for example, would be a field. A string is encased in backslashes and actions to be performed are encased in curly brackets. The lines are numbered in order of their appearance, with "0" refering to the entire line. "$" is the symbol for field. So, for example, to search for a line containing the word "nutmeg," and to print each line in which the word occurs, the awk program would consist of:

/nutmeg/ { print $0 }.

The name "awk" is derived from the names of its three developers: Alfred Aho, Peter Weinberger, and Brian Kernighan. It was developed from grep, C, and sed syntax, a combination that allows complex programs to be developed quickly. awk is frequently used for prototyping. Versions of awk include Portable Operating System Interface awk, New awk (Nawk) and GNU awk (Gawk). The Practical Extraction and Reporting Language language was developed as an improved version of awk, with which Perl is backward compatible. (als

This was last updated in April 2005

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

File Extensions and File Formats

Powered by:

SearchCompliance

SearchSecurity

  • computer worm

    A computer worm is a type of malicious software program whose primary function is to infect other computers while remaining ...

  • Single Sign-On (SSO)

    Single sign-on (SSO) is a session and user authentication service that permits a user to use one set of login credentials (e.g., ...

  • Certified Information Systems Auditor (CISA)

    Certified Information Systems Auditor (CISA) is a certification issued by ISACA to people in charge of ensuring that an ...

SearchHealthIT

SearchDisasterRecovery

  • business continuity plan (BCP)

    A business continuity plan (BCP) is a document that consists of the critical information an organization needs to continue ...

  • disaster recovery team

    A disaster recovery team is a group of individuals focused on planning, implementing, maintaining, auditing and testing an ...

  • cloud insurance

    Cloud insurance is any type of financial or data protection obtained by a cloud service provider. 

SearchStorage

Close