Total Questions : 40
Expected Time : 40 Minutes

1. What is the purpose of the 'cut' command in shell scripting?

2. How do you comment a single line in a shell script?

3. Explain the purpose of the 'mapfile' command in advanced shell scripting.

4. Explain how to handle signals in a shell script for graceful termination.

5. How can you perform a non-blocking read from a file descriptor in a shell script?

6. What does the shebang line '#!' specify in a shell script?

7. How can you pass command-line arguments to a shell script?

8. What does the 'shift' command do in shell scripting?

9. What command is used to move or rename files and directories in a shell script?

10. What is the purpose of the 'basename' command in shell scripting?

11. What is the purpose of the 'wait' command in advanced shell scripting?

12. What is the purpose of the 'readonly' command in advanced shell scripting?

13. How do you comment out multiple lines in a shell script?

14. What command is used to list the contents of a directory in a shell script?

15. How do you check the length of a string in a shell script?

16. How can you perform arithmetic operations in a shell script?

17. Which command is used to display the contents of a file in a shell script?

18. How can you implement error handling in a shell script for better debugging?

19. Explain how to create a daemon process in a shell script.

20. Explain the purpose of the 'trap' command in advanced shell scripting.

21. How do you declare and use a constant in a shell script?

22. How do you check the disk space usage in a shell script?

23. What is the purpose of the 'shebang' (#!) in the first line of a shell script?

24. How do you assign the output of a command to a variable in a shell script?

25. Which command is used to remove a file in a shell script?

26. How can you determine the number of CPU cores available in a shell script?

27. Which command is used to count the number of lines in a file in a shell script?

28. What is the purpose of the 'source' command in advanced shell scripting?

29. What does the 'declare' command do in shell scripting?

30. Explain how to perform error handling for a command within a pipeline in a shell script.

31. How do you read input from the user in a shell script?

32. In a shell script, how do you run a script located in the current directory?

33. In a shell script, how do you check if a variable is empty?

34. Which command is used to create a new directory in a shell script?

35. What command is used to display the current working directory in a shell script?

36. In a shell script, how do you read user input?

37. What is the purpose of the 'grep' command in a shell script?

38. What is the purpose of the 'case' statement in shell scripting?

39. What is the purpose of the 'awk' command in shell scripting?

40. Explain how to use the 'select' construct for menu-driven scripts in advanced shell scripting.