answersLogoWhite

0

The secondary prompt (PS2) is used to prompt the user with whatever string they want to indicate a command continuation line. For example, if I use the standard PS2 prompt and type in the command:

cat abc def \

The shell will prompt me for the rest of the line with a ? mark or some other character. I usually set my secondary prompt for something more interesting, such as:

PS2='more ? '

So that I know that the shell wants more information before executing the command line.

User Avatar

Wiki User

15y ago

What else can I help you with?