Home > Linux > Quizzes > Linux Basics Practice Test: Awk Programming
Linux Basics Practice Test: Awk Programming
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 74% Most missed: “In awk program, the statement “print” with no items”
AWK is a Linux programming language and scripting tool that can process data and generate formatted reports. It's useful for text processing, pattern search, and manipulating text in documents. A basic AWK program consists of a pattern followed by an action enclosed in curly braces, such as awk 'pattern ( action )'.  Here are some examples of AWK commands: Printing specific columns: To print the 2nd and 3rd columns, you can use the command `$ awk '(print $2 `\t'' $3)' file.txt Basic function: To print "Don't Panic!", you can use the command `$ awk `BEGIN ( print \''Don't Panic!\''... Show more
Linux Basics Practice Test: Awk Programming
Time left 00:00
25 Questions

1. All numeric values are represented within awk in
2. Which statement skips over the rest of the loop body, causing the next cycle around the loop to begin immediately?
3. What is the difference between the built-in functions rand() and srand() in awk programming?
4. An awk program can be run by
5. Which one of the following statement is not true?
6. The print and printf statements can be told to send their output to other place except standard output, is called
7. What is the output of the command awk ‘BEGIN {printf “%c\n”,65}’
8. Which one of the following statement is not true about the format-control letters for printf statement in awk program?
9. In awk, the built-in variable FS is
10. If the argument is supplied to the exit statement,
11. Which built-in function divides string into pieces seperated by fieldsep and stores the pieces in array?
12. What is FNR?
13. The next statement
14. Which one of the following is not true?
15. In awk program, the name of the array can not be same with the
16. What is the meaning of $ sign in awk programming?
17. The built-in function tolower()
18. Which one of the following is used by awk to control the conversion of numbers to string?
19. The comparison expression “x ~ y” will true if
20. Which one of the following is not true?
21. The break statement
22. In awk program, the statement “print” with no items
23. The command “awk {print $1} san.txt” will
24. What is expression in awk programming?
25. Concatenation is performed by