How do I write an awk script?

How do I write an awk script?
Answer
#!/usr/bin/awk -f BEGIN { printf “%sn”,”Writing my first Awk executable script!” }
…
Explaining the line above:
  1. #! – referred to as Shebang, which specifies an interpreter for the instructions in a script.
  2. /usr/bin/awk – is the interpreter.
  3. -f – interpreter option, used to read a program file.
9 авг. 2016 г.
 

Tìm kiếm

Back
Top