T Trần Vũ New member Sep 21, 2021 #1 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
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
N Nam Lê Member Sep 21, 2021 #2 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# Upvote 0 Downvote
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#