Awk Programming Question:
Download Questions PDF

The command "awk {print $1} san.txt" will:
a) print the first line of file san.txt
b) print the first field of every line in san.txt
c) generate syntax error
d) none of the mentioned

Awk Programming Interview Question
Awk Programming Interview Question

Answer:

b) print the first field of every line in san.txt

Download Awk Programming Interview Questions And Answers PDF

Previous QuestionNext Question
What is the output of the command awk 'BEGIN {printf "%cn",65}'
a) A
b) 65
c) syntax error
d) none of the mentioned
Which one of the following statement is not true about the format-control letters for printf statement in awk program?
a) "c" prints a number as an ASCII character
b) "d" prints a decimal integer
c) "h" prints an unsigned hexadecimal integer
d) "o" prints an unsigned octal integer