public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: "sed" bug?
@ 1999-06-16 12:23 Earnie Boyd
  1999-06-16 12:31 ` D. Richard Hipp
  1999-06-30 22:10 ` Earnie Boyd
  0 siblings, 2 replies; 22+ messages in thread
From: Earnie Boyd @ 1999-06-16 12:23 UTC (permalink / raw)
  To: D. Richard Hipp, cygwin

--- "D. Richard Hipp" <drh@acm.org> wrote:
> The following script works under Linux but fails on
> Cygwin20 running under Windows95:
> 
>   #! /bin/sh
>   echo 'E:/a/b/c' | sed 's,^\([a-zA-Z]\):/,//\1/,'
> 
> Under Linux the output is "//E/a/b/c".  Under Cygwin20,
> the output is "E:/a/b/c".  That's if I run the script from
> a file.  (The same file -- samba mounted off of the Linux
> machine.)  If I type the command in directly at the
> shell prompt, it works correctly on both machines.
> 

Does the command work interactively under sh vs bash?  Try quoting the : in the
sed search string.


===
YAWIA,
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't include me)
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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

* Re: "sed" bug?
  1999-06-16 12:23 "sed" bug? Earnie Boyd
@ 1999-06-16 12:31 ` D. Richard Hipp
  1999-06-16 13:13   ` DJ Delorie
  1999-06-30 22:10   ` D. Richard Hipp
  1999-06-30 22:10 ` Earnie Boyd
  1 sibling, 2 replies; 22+ messages in thread
From: D. Richard Hipp @ 1999-06-16 12:31 UTC (permalink / raw)
  To: earnie_boyd; +Cc: cygwin

Earnie Boyd wrote:
> 
> > The following script works under Linux but fails on
> > Cygwin20 running under Windows95:
> >
> >   #! /bin/sh
> >   echo 'E:/a/b/c' | sed 's,^\([a-zA-Z]\):/,//\1/,'
> >
> > Under Linux the output is "//E/a/b/c".  Under Cygwin20,
> > the output is "E:/a/b/c".  That's if I run the script from
> > a file.  (The same file -- samba mounted off of the Linux
> > machine.)  If I type the command in directly at the
> > shell prompt, it works correctly on both machines.
> >
> 
> Does the command work interactively under sh vs bash?  

I don't understand.  "sh" is "bash" on both Linux and
Cygwin20, is it not?  I'm not running csh if that is
what you are asking.

> Try quoting the : in the sed search string.

Just tried it.  It didn't help.  Thanks for the suggestion,
though.

-- 
D. Richard Hipp -- drh@acm.org -- http://www.hwaci.com/drh/

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

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

* Re: "sed" bug?
  1999-06-16 12:31 ` D. Richard Hipp
@ 1999-06-16 13:13   ` DJ Delorie
  1999-06-16 13:33     ` D. Richard Hipp
  1999-06-30 22:10     ` DJ Delorie
  1999-06-30 22:10   ` D. Richard Hipp
  1 sibling, 2 replies; 22+ messages in thread
From: DJ Delorie @ 1999-06-16 13:13 UTC (permalink / raw)
  To: drh; +Cc: cygwin

> I don't understand.  "sh" is "bash" on both Linux and Cygwin20, is
> it not?  I'm not running csh if that is what you are asking.

sh and bash are different in cygwin.  sh is really "ash", which is
like bash but doesn't have all the interactive bits in it, making it a
much smaller and leaner shell, good for scripts.

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

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

* Re: "sed" bug?
  1999-06-16 13:13   ` DJ Delorie
@ 1999-06-16 13:33     ` D. Richard Hipp
  1999-06-16 13:37       ` DJ Delorie
  1999-06-30 22:10       ` D. Richard Hipp
  1999-06-30 22:10     ` DJ Delorie
  1 sibling, 2 replies; 22+ messages in thread
From: D. Richard Hipp @ 1999-06-16 13:33 UTC (permalink / raw)
  To: DJ Delorie; +Cc: cygwin

DJ Delorie wrote:
> 
> > I don't understand.  "sh" is "bash" on both Linux and Cygwin20, is
> > it not?  I'm not running csh if that is what you are asking.
> 
> sh and bash are different in cygwin.  sh is really "ash", which is
> like bash but doesn't have all the interactive bits in it, making it a
> much smaller and leaner shell, good for scripts.

OK.  That's good to know.  When I type:

    bash //H/gd/acd/fu/re/configure

instead of just

    //H/gd/acd/fu/re/configure

everything appears to work.  So is this a bug
in ash?  Or is the imcompatibility intentional?

Thanks everybody for your help.
-- 
D. Richard Hipp -- drh@acm.org -- http://www.hwaci.com/drh/

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

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

* Re: "sed" bug?
  1999-06-16 13:33     ` D. Richard Hipp
@ 1999-06-16 13:37       ` DJ Delorie
  1999-06-16 13:43         ` D. Richard Hipp
  1999-06-30 22:10         ` DJ Delorie
  1999-06-30 22:10       ` D. Richard Hipp
  1 sibling, 2 replies; 22+ messages in thread
From: DJ Delorie @ 1999-06-16 13:37 UTC (permalink / raw)
  To: drh; +Cc: cygwin

> So is this a bug in ash?  Or is the imcompatibility intentional?

More likely a bug in ash (or in cygwin, but only ash stumbles upon
it).  We don't intentionally make them incompatible.  Note, however,
that bash and ash *are* different programs, so if a script relies on
some obscure bash idiosyncrasy, there's not much we can do about it.

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

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

* Re: "sed" bug?
  1999-06-16 13:37       ` DJ Delorie
@ 1999-06-16 13:43         ` D. Richard Hipp
  1999-06-30 22:10           ` D. Richard Hipp
  1999-06-30 22:10         ` DJ Delorie
  1 sibling, 1 reply; 22+ messages in thread
From: D. Richard Hipp @ 1999-06-16 13:43 UTC (permalink / raw)
  To: DJ Delorie; +Cc: cygwin

DJ Delorie wrote:
> 
> More likely a bug in ash (or in cygwin, but only ash stumbles upon
> it).  We don't intentionally make them incompatible.  Note, however,
> that bash and ash *are* different programs, so if a script relies on
> some obscure bash idiosyncrasy, there's not much we can do about it.

The problems that cleared up when I switched to bash were
"sed" expressions that were generated by standard Autoconf
macros (version 1.13).  I'm guessing that Autoconf doesn't
use any obscure bash idiosyncrasies, so it looks like this
could be an ash bug.

-- 
D. Richard Hipp -- drh@acm.org -- http://www.hwaci.com/drh/

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

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

* Re: "sed" bug?
  1999-06-16 12:23 "sed" bug? Earnie Boyd
  1999-06-16 12:31 ` D. Richard Hipp
@ 1999-06-30 22:10 ` Earnie Boyd
  1 sibling, 0 replies; 22+ messages in thread
From: Earnie Boyd @ 1999-06-30 22:10 UTC (permalink / raw)
  To: D. Richard Hipp, cygwin

--- "D. Richard Hipp" <drh@acm.org> wrote:
> The following script works under Linux but fails on
> Cygwin20 running under Windows95:
> 
>   #! /bin/sh
>   echo 'E:/a/b/c' | sed 's,^\([a-zA-Z]\):/,//\1/,'
> 
> Under Linux the output is "//E/a/b/c".  Under Cygwin20,
> the output is "E:/a/b/c".  That's if I run the script from
> a file.  (The same file -- samba mounted off of the Linux
> machine.)  If I type the command in directly at the
> shell prompt, it works correctly on both machines.
> 

Does the command work interactively under sh vs bash?  Try quoting the : in the
sed search string.


===
YAWIA,
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't include me)
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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

* Re: "sed" bug?
  1999-06-16 13:43         ` D. Richard Hipp
@ 1999-06-30 22:10           ` D. Richard Hipp
  0 siblings, 0 replies; 22+ messages in thread
From: D. Richard Hipp @ 1999-06-30 22:10 UTC (permalink / raw)
  To: DJ Delorie; +Cc: cygwin

DJ Delorie wrote:
> 
> More likely a bug in ash (or in cygwin, but only ash stumbles upon
> it).  We don't intentionally make them incompatible.  Note, however,
> that bash and ash *are* different programs, so if a script relies on
> some obscure bash idiosyncrasy, there's not much we can do about it.

The problems that cleared up when I switched to bash were
"sed" expressions that were generated by standard Autoconf
macros (version 1.13).  I'm guessing that Autoconf doesn't
use any obscure bash idiosyncrasies, so it looks like this
could be an ash bug.

-- 
D. Richard Hipp -- drh@acm.org -- http://www.hwaci.com/drh/

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

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

* Re: "sed" bug?
  1999-06-16 12:31 ` D. Richard Hipp
  1999-06-16 13:13   ` DJ Delorie
@ 1999-06-30 22:10   ` D. Richard Hipp
  1 sibling, 0 replies; 22+ messages in thread
From: D. Richard Hipp @ 1999-06-30 22:10 UTC (permalink / raw)
  To: earnie_boyd; +Cc: cygwin

Earnie Boyd wrote:
> 
> > The following script works under Linux but fails on
> > Cygwin20 running under Windows95:
> >
> >   #! /bin/sh
> >   echo 'E:/a/b/c' | sed 's,^\([a-zA-Z]\):/,//\1/,'
> >
> > Under Linux the output is "//E/a/b/c".  Under Cygwin20,
> > the output is "E:/a/b/c".  That's if I run the script from
> > a file.  (The same file -- samba mounted off of the Linux
> > machine.)  If I type the command in directly at the
> > shell prompt, it works correctly on both machines.
> >
> 
> Does the command work interactively under sh vs bash?  

I don't understand.  "sh" is "bash" on both Linux and
Cygwin20, is it not?  I'm not running csh if that is
what you are asking.

> Try quoting the : in the sed search string.

Just tried it.  It didn't help.  Thanks for the suggestion,
though.

-- 
D. Richard Hipp -- drh@acm.org -- http://www.hwaci.com/drh/

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

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

* Re: "sed" bug?
  1999-06-16 13:13   ` DJ Delorie
  1999-06-16 13:33     ` D. Richard Hipp
@ 1999-06-30 22:10     ` DJ Delorie
  1 sibling, 0 replies; 22+ messages in thread
From: DJ Delorie @ 1999-06-30 22:10 UTC (permalink / raw)
  To: drh; +Cc: cygwin

> I don't understand.  "sh" is "bash" on both Linux and Cygwin20, is
> it not?  I'm not running csh if that is what you are asking.

sh and bash are different in cygwin.  sh is really "ash", which is
like bash but doesn't have all the interactive bits in it, making it a
much smaller and leaner shell, good for scripts.

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

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

* Re: "sed" bug?
  1999-06-16 13:37       ` DJ Delorie
  1999-06-16 13:43         ` D. Richard Hipp
@ 1999-06-30 22:10         ` DJ Delorie
  1 sibling, 0 replies; 22+ messages in thread
From: DJ Delorie @ 1999-06-30 22:10 UTC (permalink / raw)
  To: drh; +Cc: cygwin

> So is this a bug in ash?  Or is the imcompatibility intentional?

More likely a bug in ash (or in cygwin, but only ash stumbles upon
it).  We don't intentionally make them incompatible.  Note, however,
that bash and ash *are* different programs, so if a script relies on
some obscure bash idiosyncrasy, there's not much we can do about it.

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

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

* Re: "sed" bug?
  1999-06-16 13:33     ` D. Richard Hipp
  1999-06-16 13:37       ` DJ Delorie
@ 1999-06-30 22:10       ` D. Richard Hipp
  1 sibling, 0 replies; 22+ messages in thread
From: D. Richard Hipp @ 1999-06-30 22:10 UTC (permalink / raw)
  To: DJ Delorie; +Cc: cygwin

DJ Delorie wrote:
> 
> > I don't understand.  "sh" is "bash" on both Linux and Cygwin20, is
> > it not?  I'm not running csh if that is what you are asking.
> 
> sh and bash are different in cygwin.  sh is really "ash", which is
> like bash but doesn't have all the interactive bits in it, making it a
> much smaller and leaner shell, good for scripts.

OK.  That's good to know.  When I type:

    bash //H/gd/acd/fu/re/configure

instead of just

    //H/gd/acd/fu/re/configure

everything appears to work.  So is this a bug
in ash?  Or is the imcompatibility intentional?

Thanks everybody for your help.
-- 
D. Richard Hipp -- drh@acm.org -- http://www.hwaci.com/drh/

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

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

* Re: "sed" bug?
  1999-06-17 22:35   ` Glenn Spell
@ 1999-06-30 22:10     ` Glenn Spell
  0 siblings, 0 replies; 22+ messages in thread
From: Glenn Spell @ 1999-06-30 22:10 UTC (permalink / raw)
  To: cygwin

On 17 Jun 1999 at 9:46AM (-0700) itz@lbin.com wrote:

> Is ash supposed to be a full implementation os the POSIX shell?

Not yet. On some platforms ash is in the process of being changed to
conform with the POSIX.2 specification.

> If not, you'll always run into scripts that are hash-banged with
> #!/bin/sh but contain constructs ash won't understand.

I've read that many Linux packages provide scripts hash-banged with
"#!/bin/sh" that depend on "bashisms"... as if bash was some sort of
standard.  That would present problems not only for ash but for any
POSIX shell as well.

-glenn

-- 
 )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
 )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
 )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )   >-----._/_/__]>
 )- blue skies - happy trails - sweet dreams -)             `0  |

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

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

* "sed" bug?
  1999-06-16 12:02 D. Richard Hipp
@ 1999-06-30 22:10 ` D. Richard Hipp
  0 siblings, 0 replies; 22+ messages in thread
From: D. Richard Hipp @ 1999-06-30 22:10 UTC (permalink / raw)
  To: cygwin

The following script works under Linux but fails on
Cygwin20 running under Windows95:

  #! /bin/sh
  echo 'E:/a/b/c' | sed 's,^\([a-zA-Z]\):/,//\1/,'

Under Linux the output is "//E/a/b/c".  Under Cygwin20,
the output is "E:/a/b/c".  That's if I run the script from
a file.  (The same file -- samba mounted off of the Linux
machine.)  If I type the command in directly at the
shell prompt, it works correctly on both machines.

Obviously, I'm trying to changes a pathname to the Cygwin
format from the windows format.  This is in the middle of
a "configure" script.  I've tried lots of things to work
around this, but with no success.  The problem seems to be
in the "\(" and "\)" of the expression.

Does anybody know of a work-around?  Am I doing something
stupid here?

Replys to drh@acm.org are appreciated.
-- 
D. Richard Hipp -- drh@acm.org -- http://www.hwaci.com/drh/

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

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

* Re: "sed" bug?
  1999-06-17  9:47 ` itz
  1999-06-17 22:35   ` Glenn Spell
@ 1999-06-30 22:10   ` itz
  1 sibling, 0 replies; 22+ messages in thread
From: itz @ 1999-06-30 22:10 UTC (permalink / raw)
  To: earnie_boyd; +Cc: drh, cygwin

   Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
   Precedence: bulk
   Sender: cygwin-owner@sourceware.cygnus.com
   Delivered-To: mailing list cygwin@sourceware.cygnus.com
   Date: Thu, 17 Jun 1999 05:36:26 -0700 (PDT)
   From: Earnie Boyd <earnie_boyd@yahoo.com>
   Reply-To: earnie_boyd@yahoo.com
   Cc: cygwin@sourceware.cygnus.com
   MIME-Version: 1.0
   Content-Type: text/plain; charset=us-ascii

   --- "D. Richard Hipp" <drh@acm.org> wrote:
   > Earnie Boyd wrote:
   -8<-
   > > Does the command work interactively under sh vs bash?  
   > 
   > I don't understand.  "sh" is "bash" on both Linux and
   > Cygwin20, is it not?  I'm not running csh if that is
   > what you are asking.
   > 

   No!!  On both systems sh is _NOT_ bash.  sh is ash which was written
   specifically for Linux to be a lightweight shell in order to increase
   processing speed.

That depens on the Linux distribution, I believe.  On my home system,
sh is bash.  And ash is older than Linux, methinks.

Is ash supposed to be a full implementation os the POSIX shell?  If
not, you'll always run into scripts that are hash-banged with
#!/bin/sh but contain constructs ash won't understand.

Not a flame - I understand that there may be excellent reasons to
avoid the full weight of bash in an emulated environment like Cygwin.

-- 
Ian Zimmerman
Lightbinders, Inc.
2325 3rd Street #324
San Francisco, California 94107
U.S.A.

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

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

* RE: "sed" bug?
  1999-06-17  5:58 Eddelbuettel, Dirk
@ 1999-06-30 22:10 ` Eddelbuettel, Dirk
  0 siblings, 0 replies; 22+ messages in thread
From: Eddelbuettel, Dirk @ 1999-06-30 22:10 UTC (permalink / raw)
  To: 'earnie_boyd@yahoo.com', D. Richard Hipp; +Cc: cygwin

		> I don't understand.  "sh" is "bash" on both Linux and
		> Cygwin20, is it not?  I'm not running csh if that is
		> what you are asking.
		> 

		No!!  On both systems sh is _NOT_ bash.  sh is ash which was
written
		specifically for Linux to be a lightweight shell in order to
increase
		processing speed.

I think that statement is wrong as far as Linux is concerned.  AFAIK most
Linux distrinutions still default to l/bin/sh (soft-)linked to /bin/bash.  

Speaking for Debian, we have tried to purge all bashism from the boot
scripts, and a few developers have /bin/sh linked to /bin/ash.  They appear
to be happy with the speedups at boot time.  I'm lazy and stick with bash.
After all, I don't reboot that often :-> 

Also, I just checked with my Debian source cd - according to the file TOUR,
dated 1989, ash is older than Linux. The sources stem from the NetBSD side
of things. 


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

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

* Re: "sed" bug?
  1999-06-17  5:36 Earnie Boyd
  1999-06-17  9:47 ` itz
@ 1999-06-30 22:10 ` Earnie Boyd
  1 sibling, 0 replies; 22+ messages in thread
From: Earnie Boyd @ 1999-06-30 22:10 UTC (permalink / raw)
  To: D. Richard Hipp; +Cc: cygwin

--- "D. Richard Hipp" <drh@acm.org> wrote:
> Earnie Boyd wrote:
-8<-
> > Does the command work interactively under sh vs bash?  
> 
> I don't understand.  "sh" is "bash" on both Linux and
> Cygwin20, is it not?  I'm not running csh if that is
> what you are asking.
> 

No!!  On both systems sh is _NOT_ bash.  sh is ash which was written
specifically for Linux to be a lightweight shell in order to increase
processing speed.
===
YAWIA,
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't include me)
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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

* Re: "sed" bug?
  1999-06-17  9:47 ` itz
@ 1999-06-17 22:35   ` Glenn Spell
  1999-06-30 22:10     ` Glenn Spell
  1999-06-30 22:10   ` itz
  1 sibling, 1 reply; 22+ messages in thread
From: Glenn Spell @ 1999-06-17 22:35 UTC (permalink / raw)
  To: cygwin

On 17 Jun 1999 at 9:46AM (-0700) itz@lbin.com wrote:

> Is ash supposed to be a full implementation os the POSIX shell?

Not yet. On some platforms ash is in the process of being changed to
conform with the POSIX.2 specification.

> If not, you'll always run into scripts that are hash-banged with
> #!/bin/sh but contain constructs ash won't understand.

I've read that many Linux packages provide scripts hash-banged with
"#!/bin/sh" that depend on "bashisms"... as if bash was some sort of
standard.  That would present problems not only for ash but for any
POSIX shell as well.

-glenn

-- 
 )      Glenn Spell <glenn@gs.fay.nc.us>      )   _       _____
 )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
 )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )   >-----._/_/__]>
 )- blue skies - happy trails - sweet dreams -)             `0  |

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

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

* Re: "sed" bug?
  1999-06-17  5:36 Earnie Boyd
@ 1999-06-17  9:47 ` itz
  1999-06-17 22:35   ` Glenn Spell
  1999-06-30 22:10   ` itz
  1999-06-30 22:10 ` Earnie Boyd
  1 sibling, 2 replies; 22+ messages in thread
From: itz @ 1999-06-17  9:47 UTC (permalink / raw)
  To: earnie_boyd; +Cc: drh, cygwin

   Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
   Precedence: bulk
   Sender: cygwin-owner@sourceware.cygnus.com
   Delivered-To: mailing list cygwin@sourceware.cygnus.com
   Date: Thu, 17 Jun 1999 05:36:26 -0700 (PDT)
   From: Earnie Boyd <earnie_boyd@yahoo.com>
   Reply-To: earnie_boyd@yahoo.com
   Cc: cygwin@sourceware.cygnus.com
   MIME-Version: 1.0
   Content-Type: text/plain; charset=us-ascii

   --- "D. Richard Hipp" <drh@acm.org> wrote:
   > Earnie Boyd wrote:
   -8<-
   > > Does the command work interactively under sh vs bash?  
   > 
   > I don't understand.  "sh" is "bash" on both Linux and
   > Cygwin20, is it not?  I'm not running csh if that is
   > what you are asking.
   > 

   No!!  On both systems sh is _NOT_ bash.  sh is ash which was written
   specifically for Linux to be a lightweight shell in order to increase
   processing speed.

That depens on the Linux distribution, I believe.  On my home system,
sh is bash.  And ash is older than Linux, methinks.

Is ash supposed to be a full implementation os the POSIX shell?  If
not, you'll always run into scripts that are hash-banged with
#!/bin/sh but contain constructs ash won't understand.

Not a flame - I understand that there may be excellent reasons to
avoid the full weight of bash in an emulated environment like Cygwin.

-- 
Ian Zimmerman
Lightbinders, Inc.
2325 3rd Street #324
San Francisco, California 94107
U.S.A.

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

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

* RE: "sed" bug?
@ 1999-06-17  5:58 Eddelbuettel, Dirk
  1999-06-30 22:10 ` Eddelbuettel, Dirk
  0 siblings, 1 reply; 22+ messages in thread
From: Eddelbuettel, Dirk @ 1999-06-17  5:58 UTC (permalink / raw)
  To: 'earnie_boyd@yahoo.com', D. Richard Hipp; +Cc: cygwin

		> I don't understand.  "sh" is "bash" on both Linux and
		> Cygwin20, is it not?  I'm not running csh if that is
		> what you are asking.
		> 

		No!!  On both systems sh is _NOT_ bash.  sh is ash which was
written
		specifically for Linux to be a lightweight shell in order to
increase
		processing speed.

I think that statement is wrong as far as Linux is concerned.  AFAIK most
Linux distrinutions still default to l/bin/sh (soft-)linked to /bin/bash.  

Speaking for Debian, we have tried to purge all bashism from the boot
scripts, and a few developers have /bin/sh linked to /bin/ash.  They appear
to be happy with the speedups at boot time.  I'm lazy and stick with bash.
After all, I don't reboot that often :-> 

Also, I just checked with my Debian source cd - according to the file TOUR,
dated 1989, ash is older than Linux. The sources stem from the NetBSD side
of things. 


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

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

* Re: "sed" bug?
@ 1999-06-17  5:36 Earnie Boyd
  1999-06-17  9:47 ` itz
  1999-06-30 22:10 ` Earnie Boyd
  0 siblings, 2 replies; 22+ messages in thread
From: Earnie Boyd @ 1999-06-17  5:36 UTC (permalink / raw)
  To: D. Richard Hipp; +Cc: cygwin

--- "D. Richard Hipp" <drh@acm.org> wrote:
> Earnie Boyd wrote:
-8<-
> > Does the command work interactively under sh vs bash?  
> 
> I don't understand.  "sh" is "bash" on both Linux and
> Cygwin20, is it not?  I'm not running csh if that is
> what you are asking.
> 

No!!  On both systems sh is _NOT_ bash.  sh is ash which was written
specifically for Linux to be a lightweight shell in order to increase
processing speed.
===
YAWIA,
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't include me)
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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

* "sed" bug?
@ 1999-06-16 12:02 D. Richard Hipp
  1999-06-30 22:10 ` D. Richard Hipp
  0 siblings, 1 reply; 22+ messages in thread
From: D. Richard Hipp @ 1999-06-16 12:02 UTC (permalink / raw)
  To: cygwin

The following script works under Linux but fails on
Cygwin20 running under Windows95:

  #! /bin/sh
  echo 'E:/a/b/c' | sed 's,^\([a-zA-Z]\):/,//\1/,'

Under Linux the output is "//E/a/b/c".  Under Cygwin20,
the output is "E:/a/b/c".  That's if I run the script from
a file.  (The same file -- samba mounted off of the Linux
machine.)  If I type the command in directly at the
shell prompt, it works correctly on both machines.

Obviously, I'm trying to changes a pathname to the Cygwin
format from the windows format.  This is in the middle of
a "configure" script.  I've tried lots of things to work
around this, but with no success.  The problem seems to be
in the "\(" and "\)" of the expression.

Does anybody know of a work-around?  Am I doing something
stupid here?

Replys to drh@acm.org are appreciated.
-- 
D. Richard Hipp -- drh@acm.org -- http://www.hwaci.com/drh/

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

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

end of thread, other threads:[~1999-06-30 22:10 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-16 12:23 "sed" bug? Earnie Boyd
1999-06-16 12:31 ` D. Richard Hipp
1999-06-16 13:13   ` DJ Delorie
1999-06-16 13:33     ` D. Richard Hipp
1999-06-16 13:37       ` DJ Delorie
1999-06-16 13:43         ` D. Richard Hipp
1999-06-30 22:10           ` D. Richard Hipp
1999-06-30 22:10         ` DJ Delorie
1999-06-30 22:10       ` D. Richard Hipp
1999-06-30 22:10     ` DJ Delorie
1999-06-30 22:10   ` D. Richard Hipp
1999-06-30 22:10 ` Earnie Boyd
  -- strict thread matches above, loose matches on Subject: below --
1999-06-17  5:58 Eddelbuettel, Dirk
1999-06-30 22:10 ` Eddelbuettel, Dirk
1999-06-17  5:36 Earnie Boyd
1999-06-17  9:47 ` itz
1999-06-17 22:35   ` Glenn Spell
1999-06-30 22:10     ` Glenn Spell
1999-06-30 22:10   ` itz
1999-06-30 22:10 ` Earnie Boyd
1999-06-16 12:02 D. Richard Hipp
1999-06-30 22:10 ` D. Richard Hipp

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).