20 Questions

Shell scripting Quiz

1 :-

24)What is the syntax to loop through a range of numbers in a shell script?

2 :-

9)Which command is used to display the current working directory in a shell script?

3 :-

7)How do you comment out a line in a shell script?

4 :-

4)Which of the following operators is used for string comparison in a shell script?

5 :-

25)What is the syntax to declare a variable in a shell script?

6 :-

44)Which of the following commands can be used to check the disk space usage of a file system

7 :-

17)Which of the following commands can be used to remove a file and its contents?

8 :-

13)What is the purpose of the 'case' statement in a shell script?

9 :-

3)Which command can you use to check if a file exists in a shell script?

10 :-


8)Which of the following commands is used to loop through a list of items in a shell script?

11 :-

49)Which of the following commands can be used to display the last lines of a file?

12 :-

22)What is the syntax to check if a file exists in a shell script?

13 :-

36)What is the syntax to set the value of an environment variable in a shell script?

14 :-

32)What is the syntax to redirect standard output and standard error to a file in a shell script?

15 :-

1)Which of the following is the correct syntax for creating a variable in a shell script?

16 :-

10)Which of the following commands is used to create a directory in a shell script?

17 :-

20)Which of the following commands can be used to perform arithmetic operations in a shell script?

18 :-

6)What is the exit status of a shell script?

19 :-

43)Which of the following commands can be used to unzip a compressed file?

20 :-

19)Which of the following commands can be used to print the current working directory?

Mock Test Completion Certificate
You scored 0 out of 20 questions.

🏅

For your extraordinary service and contributions to your profession.
We are delighted in providing this certificate to you.

Tips for improving your score:

  • Make sure to read the questions and answer choices carefully.
  • Don't try to answer any choices that you don't know. It's better to skip a question.