Home > Unix Programming > Quizzes > Unix Basics Practice Test: Shell Programming
Unix Basics Practice Test: Shell Programming
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 100% Most missed: “Which command is used to find out the consumption of a specific directory?”
Quiz questions on shell programming using read command and command line arguments, logical operators and conditional execution, using test and [ ] to evaluate expressions, case and expr commands, administrator specific commands and privileges. A Unix shell is a command-line interpreter or shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command language and a scripting language, and is used by the operating system to control the execution of the system using shell scripts. Shell programming is a powerful tool that can be... Show more
Unix Basics Practice Test: Shell Programming
Time left 00:00
25 Questions

1. To check if the file exists and is executable we have to use ___ option with test.
2. When we use &&, the second command is executed only when first succeeds.
3. Which symbol is used for finding the length of the string?
4. The name of the script is stored in which special parameter?
5. Every pattern in case statement in terminated with a _____
6. Which of the following operators are used for logical execution?
7. Which of the following commands let us perform a set of instructions repeatedly?
8. Which of the following is used for storing the number of positional parameters?
9. For locating the first position of a character in a string we can use expr command.
10. shutdown command is used by the administrator for shutting down the system.
11. Which of the following pattern is used for extracting a substring using expr?
12. We can use a test to test various file attributes.
13. userdel is used for removing users from the system.
14. test command can be used to check which of the following?
15. -d option is used for checking if the file exists and is a directory.
16. Which command is used for changing filename extensions?
17. Which command is used by the shell for manipulating positional parameters?
18. Which option is used for checking if the file exists or not?
19. test statement cannot ______
20. The complete set of positional parameters is stored in ______ as a single string.
21. The PATH for superuser doesn’t include current directory.
22. The access to the use of at and batch is restricted and controlled by ___ and ____
23. Shell scripts are executed in a separate child shell process.
24. test and [ ] can be used for string comparison.
25. The first argument is read by the shell into the parameter ___