Prompts

There are a number of prompt variables in the Korn shell: PS1 and PS2 are two of them. PS1 contains your primary prompt string and is displayed by the Korn shell when it is ready to read a command. If not specified, the default is $ for regular users, and # for superusers.

PS2 specifies the secondary prompt string and is displayed whenever the Korn shell needs more input. For example, when you press <RETURN> before a complete command has been given, or continue a command onto the next line with the \ character, the PS2 variable is displayed. If not specified, the default for PS2 is the > character.

					$ print "Here is
					> another line"
					Here is another line
				

Customizing Your Command Prompt

By default, the command prompt is set to the $

Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.