awk allows the user to use variables of his own choice.

Answer: a
Explanation: awk has certain built-in variables like $0, NR, it also permits the user to use variables of his own choice. For example, following command print the name of those directors having salary>6000.
Code:
$ awk  -F “|” ‘$3== “director” || $6 > 6000 { 
> count=count+1
>printf “%-20s  %d\n”, $2, $6}’ emp.lst
 

Tìm kiếm

Back
Top