ath1410 wrote:

>tks, Mr Larry.
>
>I checked the sites you refered, but did not still quite figure
>out (partly because of my poor English?) the way bash works the
>way it does. To make things simple, just take up one case here.
>
>$PS1=\\\\u           -4  returns \u
>
>the 1st \ escapes the 2nd \, and the 3rd one to the 4th one
>likewise.
>
>So  $PS1=\\\\u is something like $PS1='\\u' ( which actually
>returns \u, not user name.
>
>It seems to me that when bash handles $PS1='\\u', 1st \ escapes
>the 2nd one and  $PS1='\\u' seems equal to $PS1='\u' which
>returns user name.
>
>How shell recognize $PS1='\\u' and how shell return \u, not a
>user name?
>
>This problem is pestering me for 3 whole days. Please help!
>

Not sure I can the language is a problem linux HOWTO's are available in
most languages including Japanese @:
http://www.ibiblio.org/pub/Linux/docs/HOWTO/translations/ja/

Hopefully this will help.

Larry

>
>
>
>
>
>
>  
>
>>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

Reply via email to