Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <38A056A2.F6479F21@veritas.com> Date: Tue, 08 Feb 2000 09:47:14 -0800 From: Bob McGowan Organization: VERITAS Software X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Jean-Paul DOT Gabrielli AT sema DOT fr CC: cygwin AT sourceware DOT cygnus DOT com Subject: Re: __[[__ operator in bash ? References: <000701bf7243$c0fa2ee0$8b01010a AT volga DOT sophia DOT sema DOT fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit 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 cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- Bob McGowan Staff Software Quality Engineer VERITAS Software rmcgowan AT veritas DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com