Multiple choice technology operating systems

Consider the following case echo * We know that the output will be the list of all the files in current directory or equivalent to ls output. Which of the following command gives the ouput as * for the above script.

  1. set -t

  2. set -m

  3. set -f

  4. set -l

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

'set -f' (or 'set -o noglob') disables glob expansion, preventing the '*' from being expanded to filenames. Without this flag, 'echo *' lists all files in the current directory. With 'set -f', the literal asterisk is echoed. Options A (-t), B (-m), and D (-l) are set options for other purposes (one-word-at-a-time, monitor, and auto-export respectively).