public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 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

* 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-08  6:51 Jean-Paul Gabrielli
@ 2000-02-08  9:43 ` Bob McGowan
  0 siblings, 0 replies; 4+ messages in thread
From: Bob McGowan @ 2000-02-08  9:43 UTC (permalink / raw)
  To: Jean-Paul.Gabrielli; +Cc: cygwin

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

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.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-09  4:56 __[[__ operator in bash ? Earnie Boyd
  -- strict thread matches above, loose matches on Subject: below --
2000-02-08 10:54 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).