EmbLogic's Blog

Command line Prompt – PS1, PS2

Command line Prompt
Environmental variables that controls Command line Prompt
PS1 : Controls the format of default command line prompt.
PS2 : Controls the format of second-tier command line prompt.
PS3 : Controls the format of tertiary command line prompt.

- Shell uses default PS1 prompt for initial data entry into shell.
- If we enter a command that requires additional information, shell displays second-tier prompt specified by PS2 .
- To display current settings for prompt use command :
echo $PS1
echo $PS2
- PS3 is used only in shell scripts.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>