The command "awk '{if ("9″>"10″) print "google" else print "linux"}'"
a) will print "google"
b) will print "linux"
c) will generate syntax error
d) none of the mentioned
Submitted by: Murtazac) will generate syntax error
Explanation:
Semicolon is required just before the else statement to parse the statement.
Output:
root@ubuntu:/home/google# awk '{if ("9″>"10″) print "google" else print "linux"}'
awk: {if ("9″>"10″) print "google" else print "linux"}
awk: ^ syntax error
root@ubuntu:/home/google#
Submitted by: Murtaza
Explanation:
Semicolon is required just before the else statement to parse the statement.
Output:
root@ubuntu:/home/google# awk '{if ("9″>"10″) print "google" else print "linux"}'
awk: {if ("9″>"10″) print "google" else print "linux"}
awk: ^ syntax error
root@ubuntu:/home/google#
Submitted by: Murtaza
Read Online Awk Programming Job Interview Questions And Answers
Top Awk Programming Questions
☺ | The next statement: |
☺ | The command \"awk {print $1} san.txt\" will: |
☺ | The break statement: |
☺ | Which statement instructs gawk to stop processing the current data file? |
Top Linux OS Categories
☺ | Device Drivers Interview Questions. |
☺ | Linux OS Management Interview Questions. |
☺ | Linux Makefile Interview Questions. |
☺ | Linux Environment Interview Questions. |
☺ | Linux OS Shell Interview Questions. |