Multiple choice technology web technology

What is the use of the PS3 variable ?

  1. PS3 is not a valid UNIX literal

  2. to change the prompt displayed by the select loop

  3. To display the process id of the last background process

  4. The secondary shell prompt string for continuous lines

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

In Unix/Linux shell scripting, PS3 is the special variable that sets the prompt string for the select command in interactive shell scripts. PS1 is the primary prompt, PS2 is the secondary prompt for continuation lines, and $$ (not PS3) gives the last background process ID.