Home > Unix Programming > Quizzes > Unix Basics Practice Test: Awk Command Operations
Unix Basics Practice Test: Awk Command Operations
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 68% Most missed: “awk uses ______ for splitting a line into fields.”
AWK is a pattern-action language that is designed for processing text files. It is often used to extract specific data from files, format data, and perform calculations on data. AWK is a very efficient language for processing large text files, and it is often used in shell scripts and other Unix utilities. Here are some of the common operations that can be performed using AWK: Scanning files line by line: AWK can read a file line by line and process each line individually. Splitting each input line into fields: AWK can split each input line into fields based on a delimiter, such as a... Show more
Unix Basics Practice Test: Awk Command Operations
Time left 00:00
25 Questions

1. Which of the following is an associative array?
2. awk uses ______ for splitting a line into fields.
3. Which of the following will be used to print lines containing ‘manager’ in emp.lst?
4. The _____ function extracts a substring from a string.
5. Which of the following is not a built-in variable used by awk?
6. For pattern-matching, awk uses regular expressions in ____ style.
7. ____ section can be used if we’ve to print something before processing the first line.
8. Which option is used for reading an awk program from a file?
9. What is the default delimiter used by awk?
10. Which built variable is used for defining the field delimiter in the output?
11. Which of the following is supported by awk?
12. awk doesn’t use $ in evaluation or assignment of variables.
13. The ____ variable stores the name of the file currently being processed.
14. Which built-in variable is used by the awk to specify the line numbers?
15. awk supports the use of arrays.
16. awk uses ___ operator for concatenating strings.
17. ____ function breaks up a string on the basis of delimiter.
18. awk allows the user to use variables of his own choice.
19. Awk filter operates at field level.
20. A user-defined variable is initialized to ____
21. Which of the following is a built-in variable for awk?
22. FS defines the field separator.
23. sqroot(x) function returns the square root of x.
24. print statement is necessary for printing a line.
25. awk makes a distinction between numeric and string variables.