⟩ What is the use of fcntl function? a) locking a file b) reading the file descriptor flag c) changing the file status flag d) all the above
d) all the above
d) all the above
cat < file1 >> file2 | file3 a) file1 content will be appended to file2 and finally stored in file3 b) file1 content will be appended to file2 and file3 will be ignored c) file2 and file3 will have same content d) syntax error
Which variable is used to display number of arguments specified in command line a) $0 b) $# c) $* d) $?
Syntax to suppress the display of command error to monitor? a) command > &2 b) command 2> &1 c) command 2> &2 d) command 2> /dev/null
Which of the following file set in the current directory are identified by the regular expression a?b*? a) afcc, aabb b) aabb, axbc c) abbb, abxy d) abcd, axbb
When the return value of any function is not specified within the function, what function returns? a) nothing b) exit status of the last command executed c) 0 d) none of the mentioned
* Specifies a) one or more character b) zero or more charecter c) nothing d) None of the above
Which of the following command provides the list of the functions defined in the login session? a) declare -f b) declare -F c) both (a) and (b) d) none of the mentioned
Functions improves the shell's program-ability significantly, because a) when we invoke a function, it is already in the shell's memory, therefore a function runs faster than seperate scripts b) function provides a piece of code for repetative tasks c) both (a) and (b) d) none of the mentioned
Parameters can be passed to a function a) by using the parameter variables $1, $2, $3……. b) by using the environment variables c) both (a) and (b) d) none of the mentioned
What is the output of this program? #!/bin/sh san_function() { echo "Welcome to the google" printf "World of Linuxn" } unset -f san_function san_function exit 0 a) Welcome to the google b) World of Linux c) both (a) and (b) d) nothing will print