[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: unexpected csh behaviour



On Wed, 2008-06-25 at 15:10 +0100, michael wrote:
> In the below, I was expecting $#test to return 1 and $%test to return 7
> - can somebody clarify why this isn't so? Ta, $test
> 
> 
> 
> ratty:~/models-3/mcip3> setenv test michael
> ratty:~/models-3/mcip3> echo $test
> michael
> ratty:~/models-3/mcip3> echo $?test
> 1
> ratty:~/models-3/mcip3> echo $#test
> michael
> ratty:~/models-3/mcip3> echo $?test
> 1
> ratty:~/models-3/mcip3> echo $%test
> michael
> 
> 

it must be to do with shell var or env var since:

[mccssmb2@horace3 Apr08]$ set t=michael
[mccssmb2@horace3 Apr08]$ echo $t
michael
[mccssmb2@horace3 Apr08]$ echo $?t
1
[mccssmb2@horace3 Apr08]$ echo $%t
7
[mccssmb2@horace3 Apr08]$ unset t ; setenv t michael
[mccssmb2@horace3 Apr08]$ echo $t $?t $%t
michael 1 michael
[mccssmb2@horace3 Apr08]$ 




Reply to: