Bash Shell Scripting Quiz Questions and Answers

Which command allows to view the current jobs being handled by the shell?

Answer :
  • jobs

Command used to count the number of characters in a file is______.

Answer :
  • wc

An awk program can be run by?

Answer :
  • All of the mentioned

Which command is used to close the vi editor?

Answer :
  • both q and wq

Which command searches the string in file opened in vi editor?

Answer :
  •  / or ?

Which command is used to reexecute the previous command?

Answer :
  • !!

Which command executes ‘command’ in place of the current process instead of creating a new process?

Answer :
  • exec

When the return value of any function is not specified within the function, what function returns?

Answer :
  • exit status of the last command executed

The dmesg command?

Answer :
  • kernel log messages

Which represents the user home directory?

Answer :
  •  ~