answersLogoWhite

0


Best Answer

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

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a secondary prompt in UNIX?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the administrator's prompt in the command line on unix?

The usual indication of running as the administrator in Unix is show a prompt that contains the '#' character as either the prompt or part of the prompt.


What is prompt in unix?

The prompt is an indication that the system is waiting for work to do, i.e. waiting for you type in a command.


How do you change commpand prompt form to in unix?

Use the shell variable PS1 to set the command prompt to whatever you need.


What is the prompt symbol traditionally associated with ordinary users in UNIX?

dollar sign ($)


Can you compile job in Unix prompt?

Depends on what you mean by a "job". You can compile a program.


How can you identify by seeing in the prompt whether the command is external or internal in unix?

You really can't. There is nothing in a prompt that would give that information.


How you change your prompt to always the current path in UNIX?

Use the following: PS1='$PWD : '


Where can you get a Unix shell for Windows?

A Unix shell can be obtained in Cygwin, a Unix compatibility layer used to compile Unix programs and run them on Windows. Microsoft also makes a shell known as "Windows PowerShell" which incorporates more Unix-like features than the standard command prompt.


What command is used to create a folder in the command prompt?

In Windows and Unix-based and Unix-like systems, the command is mkdir (however in Windows a shortcut md can be used as well).


How do you log into Unix?

You can log in via telnet or ssh protocol for a command line prompt environment to Unix, or you can use a graphical user interface such as KDE or Gnome, or the CDE environment via X-windows. In any of these protocols, you must supply a username and password to successfully log into the Unix system.


How does user know where he is in the file system in unix operating system?

Most people set up their shell to give them an indication in the command prompt. But this isn't "built in" (the mechanism for doing so is built in to most shells, but you can use the same mechanism to change the prompt to pretty much anything you want).The command pwd on a Unix system should tell you "where you are".


In the unix system what does set the prompt text mean?

It generally refers to setting the text that will appear when the shell prompt is asking the user to type in a command, meaning, the shell needs work to do. The standard prompt in most shell environments is a single character, such as '#', '$', or '%'. By setting the prompt you can customize what appears when the system is idle and wants you to type in a command to do something.