awk uses __ and __ as comparison operators.

Answer: b
Explanation: awk uses the && and | | as logical operators in the same sense as used by the C. The following command looks for two strings in third field only using || operator.
Code:
$ awk  -F “|” ‘$3== “director” || $3== “manager” { printf “%-20s  %-12s  %d\n”, $2, $6}’ emp.lst
 

Tìm kiếm

Back
Top