Subject: Re: __[[__ operator in bash ?
From: Bob McGowan <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Tue, 08 Feb 2000 09:47:14 -0800

Jean-Paul,

When you copied bash.exe to /usr/bin, did you name it sh.exe?  If not,
you can rename it, or change the script so it begins with
#!/usr/bin/bash or you can make a symbolic link to bash named sh:

	cd /usr/bin
	ln -s bash.exe sh

Any of these should give you the bash environment that recognizes the [[
... ]] syntax.  There is an sh.exe in /bin that you may want to rename
to ash.exe and make a link or copy of bash.exe named sh there as well.

You could, if you like, completely remove the bash.exe from /usr/bin and
change the link command as follows:

	ln -s /bin/bash.exe sh

being sure you are in /usr/bin when you run it.

Bob

Jean-Paul Gabrielli wrote:
> 
> Hi,
> 
> What to put as first line (#!) to give bash the 'posix' behavior ?
> I did a copy of bash under /usr/bin for portability reasons
> 
> When I got the following script:
>         #!/usr/bin/sh
>         if [[ -d /winnt ]] ; then
>            echo "Found Folder!"
>         fi
> 
> jpgnt-tstvsn9 > test.shl
> [[: not found
> jpgnt-tstvsn9 > bash test.shl
> Found Folder!
> 
> Thanks for helping
> j-paul gabrielli
> sema dts
> 
> --
> Want to unsubscribe from this list?
> Send a message to [email-masked]

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
[email-masked]

--
Want to unsubscribe from this list?
Send a message to [email-masked]