Which one of the following command will change our primary prompt from $ to C>?

Which one of the following command will change our primary prompt from $ to C>?
A. PS1=”C> “
B. PS2=”C>”
C. PS1=”>C”
D. PS2=”<C”
 
Answer: a
Explanation: The primary prompt string PS1 is the one we normally see i.e. $. But we can change this prompt for our convenience. As we know that the primary prompt string is stored in PS1, we can use the following command to change our prompt.
Code:
$ PS1=”C>”
C&gt;        // new prompt
 

Tìm kiếm

Back
Top