HP3000-L Archives

May 2000, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Erik Vistica <[log in to unmask]>
Reply To:
Erik Vistica <[log in to unmask]>
Date:
Mon, 15 May 2000 09:12:52 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
Yes, ' [ expression ] ' (note the white space around the [ ] ) is a
synonym for the 'test' command. The only way I saw the same error msg
was if I renamed /SYS/HPBIN/TEST to something else. That is, the 'test'
command could not be found. While I didn't try it, I expect that you
would get the same symptom if the symbolic link /bin/test were missing.


Russell Bevers wrote:
>
> I have been unable to get the '[' command to work in shell scripts.  I've
> checked the docs and supposedly '[' is a command in the MPE/ix POSIX shell
> (e.g. if [ -f doiexist.c ]
> then
>  .
>  .
> fi )
>
> but all my scripts that utilize it return
>
> ../scriptname linenum: [: not found
>
> I thought this was a shell internal command?  But the docs also say there
> is a man page for [.  I have yet to find it . . .
>
> Can anyone enlighten me here?
>
> -Russell

ATOM RSS1 RSS2