Shell Scripting MCQ Test: Shell Scripting MCQs - Practice Questions
1. What does the command 'grep' do in shell scripting?
2. In a shell script, how do you check if a file exists before performing an operation?
3. What is the purpose of the 'alias' command in a shell script?
4. What does the 'chmod' command do in a shell script?
5. How do you implement parallel processing in a shell script?
6. What command is used to display the manual for a command in a shell script?
7. What is the purpose of the 'wait' command in advanced shell scripting?
8. How do you comment a single line in a shell script?
9. What is the purpose of the 'shopt' command in advanced shell scripting?
10. How can you determine the number of CPU cores available in a shell script?
11. How can you pass command-line arguments to a shell script?
12. In a shell script, how do you concatenate two strings?
13. Explain the purpose of the 'trap' command in advanced shell scripting.
14. How do you assign the output of a command to a variable in a shell script?
15. Explain the purpose of the 'mapfile' command in advanced shell scripting.
16. What command is used to list the contents of a directory in a shell script?
17. What is the purpose of the 'source' command in advanced shell scripting?
18. How do you check the version of the shell in a shell script?
19. What is the purpose of the 'shebang' (#!) in the first line of a shell script?
20. What is the purpose of the 'paste' command in shell scripting?