Larry Sword wrote:
ath1410 wrote:
Can someone help! I have been trying to explain the way bash
works as follows.
$PS1=\\u -2 returns user
$PS1=\\\u -3 returns user
$PS1=\\\\u -4 returns \u
$PS1=\\\\\u -5 returns \u
$PS1=\\\\\\u -6 returns \user
$PS1=\\\\\\\u -7 returns \user
$PS1=\\\\\\\\u -8 returns \u
$PS1=\\\\\\\\\u -9 returns \u
$PS1=\\\\\\\\\\u -10 returns \user
$PS1=\\\\\\\\\\\u -11 returns \user
$PS1=\\\\\\\\\\\\u -12 returns \\u
I can understand somewhere around;
$PS1=\\\u -3 returns user
But more than that, I can't figure out why bash respond
as it does. What the logic behind it?
Review the two HOWTO's:
1. BASH Programming-Introduction HOW-TO
and
2. From Power Up to Bash Prompt
Should be: Bash Prompt HOWTO @
http://www.linuxselfhelp.com/HOWTO/Bash-Prompt-HOWTO/
This probable is answered as a string comparsion operators.
Larry
------------------------------------------------------------------------
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com