The command "awk '{if ("9">"10") print "123hoidap" else print "linux"}'"

Trần Vũ

New member
The command "awk '{if ("9">"10") print "123hoidap" else print "linux"}'"
A. will print "123hoidap"
B. will print "linux"
C. will generate syntax error
D. none of the mentioned
 
Answer: c
Explanation: Semicolon is required just before the else statement to parse the statement.
Output:
root@ubuntu:/home/123hoidap# awk '{if ("9">"10") print "123hoidap" else print "linux"}'
awk: {if ("9">"10") print "123hoidap" else print "linux"}
awk: ^ syntax error
root@ubuntu:/home/123hoidap#
 

Tìm kiếm

Back
Top