{" "} Programming Help by Programmers hub

AWK Programming

AWK is an interpreted programming language designed for searching files for lines that contain certain pattern. AWK release the new version which is known as NAWK or new AWK. AWK was in demand in 1970s and 1980s but in 1990s AWK was replaced by the pearl. AWK matches the lines by lines and when a line matches one of the pattern awk perform specific task on that line. Awk progeams are data-driven programming language in which you have to describe the data you wish to work with, and then what to do when you find it. AWK is different from procedural languages in procedural languages you have to describe in details the steps of the program but AWK programming is independent and easy for write and read.

AWK Build-In variables

  • NR: Keeps a current count of the number of input records.
  • NF: Keeps a count of the number of fields in an input record.
  • FILENAME: Contains the name of the current input-file.
  • FS: Contains the "field separator" character used to divide fields on the input record.
  • RS: Stores the current "record separator" character.
  • OFS: Stores the "output field separator", which separates the fields when Awk prints them

Functions and Commands



Return the arctangent of y/x in radians. {N}



Exit from a while, for, or do loop.





Begin next iteration of while, for, or do loop.



Return the cosine of x, an angle in radians. {N}


delete array[element] delete{" "} array

Delete element from array

Improve Your Grades with Custom Writing Help
Homework Help
Writing Help
Editing Services
Plagiarism check
Proofreading services
Research Project help
Custom writing services
E learning blogs

Disclaimer : The study tools and academic assistance/guidance through online tutoring sessions provided by AssignmentHelp.Net is to help and enable students to compete academically. The website does not provide ghostwriting services and has ZERO TOLERANCE towards misuse of the services. In case any user is found misusing our services, the user's account will be immediately terminated.