Nguyễn Trọng Tân
New member
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:
Answer
#!/usr/bin/awk -f BEGIN { printf “%sn”,”Writing my first Awk executable script!” }
…
Explaining the line above:
- #! – referred to as Shebang, which specifies an interpreter for the instructions in a script.
- /usr/bin/awk – is the interpreter.
- -f – interpreter option, used to read a program file.