bug-sh-utils
[Top][All Lists]
Advanced

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

Re: Re: Problem with test -d


From: stefan . marquardt
Subject: Re: Re: Problem with test -d
Date: Mon, 3 Jun 2002 10:10:46 +0200

Hello Bob,

i thinks that "test -d one two three" should work fine.


>Thanks for your report.  There does indeed seem to be a problem on
>HP-UX.  I am filing a defect against it.

>> ENTW-HP: /home/user/work # test -d man???
>> ENTW-HP: /home/user/work # echo $?
>> 0
>> ENTW-HP: /home/user/work # echo $USERDIR/work/man???
>> /home/user/work/man000 /home/user/work/man001 /home/user/work/man002
/home/user/

>What shell are you using?  'test' is a builtin to the shell.  On HP-UX
>this might be /bin/sh, /bin/ksh, /bin/csh, etc.

>  type test
>  test is a shell builtin

Built -in, POSIX Shell from HP.




>> On Linux:
>>
>> address@hidden /home]# echo $USERDIR/work/man???
>> /home/work/man100 /home/work/man101 /home/work/man102
>> address@hidden /home]# test -d $USERDIR/work/man???
>> test: too many arguments

>I was able to recreate your problem on hpux.

>On HP-UX:
>  sh -c 'test -d . one two three;echo $?'
>  0
>
>But IMNHO that is incorrect behavior.  The GNU utilities and probably
>the bash shell(?) are implementing correct behavior.  Those extra
>arguments should not be there.  This is apparently covering up a bug
>in the shell script.


Hmm ..

"test -d . one two three" gets returncode 0 on:

HP-UX, SCO OpenServer 5.05, ReliantUnix (Sinix), SunSolaris

This is 4:1 .

If it works in all other OS i think that it isn't an correct behavior.

S.Marquardt
hagebau dd
germany







**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************




reply via email to

[Prev in Thread] Current Thread [Next in Thread]