Solved! I should have read man bash pages!
Options are one of the Arguments.
test arg1 arg2 arg3 ..
So,
$test -n or $test -z is just like $test abc.
-n, -z, or abc is handled as arg1 and as 'a string'. Then
test deos not think that -z or -n is an option stateme
Tks Mr.miLosh & Mr.Dean,
This problem is getting clear now. However, let me please
ask one more question that still remains in me.
Mr.miLosh advised;
>first of all, in the '-z' example u r giving a string,
>whic
you help??
>
>On Thu, Dec 19, 2002 at 12:44:30PM +0900, ath1410 wrote:
>> $test -z ""
>this tests whether the string is empty. in this example it
>is, therefor exit code 0.
>
>>
>> But it returns differen
you help??
>
>On Thu, Dec 19, 2002 at 12:44:30PM +0900, ath1410 wrote:
>> $test -z ""
>this tests whether the string is empty. in this example it
>is, therefor exit code 0.
>
>>
>> But it returns differen
$echo $? returns 0 after these test commands.
$test -z ""
$test -z
But it returns different value after followings.
$test -n ""-- echo$? returns 1
$test -n -- " " 0
Can someone explain why it goes as above? Especially
I don't figure out why
#x27;\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!
>
>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=\\\