Shell Scripting Quiz (Set 11) Shell Scripting (Set 1) 1 / 10 Which operator is used for command substitution in a shell script? [] {} $() 2 / 10 What is the purpose of the 'cut' command in a shell script? Extracts specific columns from a text file Deletes a file Copies files and directories Finds and replaces text in a file 3 / 10 Which command is used to read user input in a shell script? read input get userinput 4 / 10 What does the 'if' statement in a shell script do? Defines a function Performs conditional branching Creates a loop Prints output 5 / 10 Which variable contains the exit status of the last executed command? $$ $@ $? $* 6 / 10 What is the purpose of the 'grep' command in a shell script? Print the current working directory Create a new directory Display environment variables Search for patterns in text 7 / 10 Which command is used to iterate over items in an array in a shell script? while for loop foreach 8 / 10 What does the '$#' variable represent in a shell script? Number of arguments passed to the script Process ID of the script Exit status of the last command Name of the script 9 / 10 Which symbol is used to represent the standard output in a shell script? > < >> | 10 / 10 What command is used to make a shell script executable? chmod +x script.sh execute script.sh run script.sh enable script.sh Your score isThe average score is 0% 0% Restart quiz