๐Ÿงช Shell Scripting MCQ Quiz Hub

Shell Scripting Mcq Question Set 3

Choose a topic to test your knowledge and improve your Shell Scripting skills

Which of the following is not a type of shell?





โœ… Correct Answer: 4

Which of the following is true about shell?





โœ… Correct Answer: 4

What will be the output of $date?





โœ… Correct Answer: 3

The original Unix shell was written in the mid _______





โœ… Correct Answer: 2

The original Unix shell was written by _____





โœ… Correct Answer: 1

How many types of files are there in Unix?





โœ… Correct Answer: 2

Which of the following is true about files?





โœ… Correct Answer: 4

Which command is used to list all the files?





โœ… Correct Answer: 3

Which of the following symbol represents the current directory?





โœ… Correct Answer: 3

Which of the following syntax is used for creating files in VI editor?





โœ… Correct Answer: 2

The most common file type is ___.





โœ… Correct Answer: 1

Each entry of directory file has component(s) namely _____.





โœ… Correct Answer: 4

_____ and _____ cannot be used in a filename.





โœ… Correct Answer: 1

How many stream Unix program has?





โœ… Correct Answer: 2

What is the associated file descriptor for stdout?





โœ… Correct Answer: 2

The name of a variable can contain ________.





โœ… Correct Answer: 4

Unix shell variables will have their names in _____.





โœ… Correct Answer: 1

Whch of the following is invalid variable names?





โœ… Correct Answer: 4

Which of the following command is used to display the environment variables only?





โœ… Correct Answer: 3

How many prompt shell has?





โœ… Correct Answer: 2

Which keyword is used to remove the variable?





โœ… Correct Answer: 3

We cannot use the unset command to unset variables that are marked _______





โœ… Correct Answer: 3

$# is used to show?





โœ… Correct Answer: 1

What is true about array variable in Shell?





โœ… Correct Answer: 4

Which of the following is correct syntax for defining array values?





โœ… Correct Answer: 3

What is the syntax of array initialization when you are using ksh shell?





โœ… Correct Answer: 2

What is the syntax of array initialization when you are using bash shell?





โœ… Correct Answer: 3

what is the syntax to access array values?





โœ… Correct Answer: 1

A shell variable is capable enough to hold a single value. These variables are called _____





โœ… Correct Answer: 2

Which of the following syntax is used to access all the items in an array?





โœ… Correct Answer: 2

Which of the following code is used to print elements in range?





โœ… Correct Answer: 1

Which of the following code will count Length of in Array?





โœ… Correct Answer: 4

Which of the following is correct code to search in array?





โœ… Correct Answer: 4

Which of the following operator is not supported in Bourne shell?





โœ… Correct Answer: 3

Which external program used by bourne shell to perform simple arithmetic operations?





โœ… Correct Answer: 4

The complete expr and awk expression should be enclosed between _____





โœ… Correct Answer: 3

In relational operator, which keyword is used to represent greater than or equal?





โœ… Correct Answer: 3

Which of the boolean operator is supported in bourne shell?





โœ… Correct Answer: 4

What is the use of str operator in bourne shell?





โœ… Correct Answer: 1

Which File test operator is used to checks if file has its sticky bit set?





โœ… Correct Answer: 2

What is the used of -x file test operator?





โœ… Correct Answer: 1

What is the use of -z string operator in bourne shell?





โœ… Correct Answer: 2

What is the use of -e file test operator in korn shell?





โœ… Correct Answer: 3

Which of the following loops is not available in shell?





โœ… Correct Answer: 4

The _______ loop executes the given commands until the given condition remains true.





โœ… Correct Answer: 2

Which of the following statements that are used to control shell loops?





โœ… Correct Answer: 3

A loop may continue forever if the required condition is not met is known as _______





โœ… Correct Answer: 2

Which of the following statement is used to terminate the execution of the entire loop?





โœ… Correct Answer: 4

What is the syntax of break command that can also be used to exit from a nested loop?





โœ… Correct Answer: 3

Which of the following statement is supported in unix shell?





โœ… Correct Answer: 4