public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: __[[__ operator in bash ?
@ 2000-02-08 10:54 Earnie Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Earnie Boyd @ 2000-02-08 10:54 UTC (permalink / raw)
  To: Jean-Paul.Gabrielli, cygwin

--- Jean-Paul Gabrielli <Jean-Paul.Gabrielli@sema.fr> 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!
> 

This is a deficiency of the ash port named as sh.exe.  You may modify it to do
one of the following:

1) if [ -d /winnt ]; then
2) if test -d /winnt; then
3) fix the code for the ash port and submit the patches.

Regards,

=====
Earnie Boyd < mailto:earnie_boyd@yahoo.com >
Cygwin Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: __[[__ operator in bash ?
@ 2000-02-09  4:56 Earnie Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Earnie Boyd @ 2000-02-09  4:56 UTC (permalink / raw)
  To: Jean-Paul.Gabrielli; +Cc: cygwin users

--- Jean-Paul Gabrielli <Jean-Paul.Gabrielli@sema.fr> wrote:
> Hi,
> 
> I never heard about 'ash'... Strange.
> 
> Btw the 'sh.exe' I got in /urs/bin was put there quite a long time ago
> and I didn't verify it.
> I removed it and copied the real bash.exe there, which is quite bigger
> in size.
> 

And will be slower which is the reason ash was used for sh.

Regards,

=====
Earnie Boyd < mailto:earnie_boyd@yahoo.com >
Cygwin Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 4+ messages in thread
* __[[__ operator in bash ?
@ 2000-02-08  6:51 Jean-Paul Gabrielli
  2000-02-08  9:43 ` Bob McGowan
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Paul Gabrielli @ 2000-02-08  6:51 UTC (permalink / raw)
  To: cygwin

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@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-02-09  4:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-08 10:54 __[[__ operator in bash ? Earnie Boyd
  -- strict thread matches above, loose matches on Subject: below --
2000-02-09  4:56 Earnie Boyd
2000-02-08  6:51 Jean-Paul Gabrielli
2000-02-08  9:43 ` Bob McGowan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).