Unix interview questions part 37

Unix interview questions part 37

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. Which of the following expression is a correct wildcard pattern if we want an expression in which the last character is not numeric?

Correct Answer is : *[!0-9]

2. The shell waits for the command to complete and normally can’t do any work while the command is executing.

Correct Answer is : TRUE

3. Which of the following is/are true about Shell?

Correct Answer is : Shell is a multi-faceted, command interpreter and provides an environment to work in

4. To change the login shell in some system (like Linux) we can use ____ command.

Correct Answer is : chsh

5. set command by default displays the variables in the current shell.

Correct Answer is : TRUE

6. Which one of the following keyword is used with the set command to avoid overwrite existing file?

Correct Answer is : noclobber

7. To prevent accident logging out, we can use ____ as a keyword with the set command.

Correct Answer is : ignoreeof

8. To reverse any setting updated by set command we can use ____ symbol.

Correct Answer is : #ERROR!

9. The ____ acts as a shorthand representation of the home directory.

Correct Answer is : ~

10. Every shell uses at least one startup script in the user’s home directory, which is executed when the user logs in.

Correct Answer is : TRUE

11. Which file is executed every time a second shell is called up?

Correct Answer is : rc file

12. Which of the following are history variables?

Correct Answer is : HISTISIZE and HISTFILESIZE

13. Which one of the following command will search history list for the previous command having the last occurrence of string cvf?

Correct Answer is : /cvf

14. What is a shell script?

Correct Answer is : a file containing a series of commands

15. Shell scripts need to be saved with an extension .sh .

Correct Answer is : FALSE

16. Shell scripts are executed in a separate child shell process.

Correct Answer is : TRUE

17. The first line in any shell script begins with a _____

Correct Answer is : #

18. To run the script, we should make it executable first by using _____

Correct Answer is : chmod +x

19. To spawn a child of our own choice for running the script, we can use ___ command.

Correct Answer is : sh

20. Which command is used for making the scripts interactive?

Correct Answer is : read

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon