delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/19/11:15:14

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Fri, 19 Oct 2001 10:12:30 -0500
From: Wayne Willcox <wayne AT reliant DOT immure DOT com>
To: Ehud Karni <ehud AT unix DOT simonwiesel DOT co DOT il>
Cc: drobinow AT dayton DOT adroit DOT com, cygwin AT cygwin DOT com
Subject: Re: cygiwn newline character
Message-ID: <20011019101230.A509@reliant.immure.com>
Reply-To: Wayne Willcox <wayne AT reliant DOT immure DOT com>
References: <80575AFA5F0DD31197CE00805F650D7602D03B AT wilber DOT adroit DOT com> <20011019075118 DOT B99095 AT reliant DOT immure DOT com> <200110191446 DOT QAA00695 AT linux.>
Mime-Version: 1.0
X-Mailer: Mutt 1.0pre2i
In-Reply-To: <200110191446.QAA00695@linux.>
X-Operating-System: FreeBSD reliant.knighthammer.com 3.5-STABLE FreeBSD 3.5-STABLE

Well news flash Linux and windows are not the only OS's and the fact that
redhat changed the behaviour in 1999 is recent.  I have programs that
are alot older then 2 years.  I was not really suggesting that anything
is changed.  This is just one more example of the crazy Linux development
or lack of it environment.  I was pointing out that it is a bad idea to
write code that you know is not portable.  Someday that bash only shell
program you wrote just might need to be run somewhere else.  Sometimes
making your code unportable is prefered either for performance or 
additional features but to simply make it not portable because you don't
care that is a poor programing practice.
echo has always had issues across platforms, so why add additional ones
for no reason.  Now if you can give me a good reason I would not want
support the the escape \ that would be different.
Having an option -e is okay but my systems don't always have the latest
versions of bash in fact they might not have bash at all.  If I just use
the -e now I have a bug.  So now you have made me check if the -e is 
there or not if I care about portablity and want to use this feature.
Aliases only work if you have them set and again you won't want them 
set for all systems.  So again my point is not if this is current 
behaviour but that it was changed for no reason and breaks compatability
for no reasons that I have yet heard.
BTW: I use sh because I want my scripts to work on any system that is
required.  I only use ksh or bash when I need things like array support.
You see I write shell scripts as part of my job and I write them for
alot of different systems.  I really prefer across platform compatablity
unless there is a really good reason to not have it.  Someday I might 
need to use your bash scripts and I will have to go through them and
modify them or build bash for my FreeBSD system.  Since I don't use
bash on FreeBSD that would be just anther hassle.


On Fri, Oct 19, 2001 at 04:46:45PM +0200, Ehud Karni wrote:
> On Fri, 19 Oct 2001 07:51:18 -0500, Wayne Willcox <wayne AT reliant DOT knighthammer DOT com> wrote:
> > 
> > Looks like the shell built-in is the echo that has been changed.  
> > Good to know since that means you can use the standard echo from
> > the /bin directory.
> 
> It is NOT new syntax (here is part of bash 2.0.3 man page (from RH 6.0
> Linux 1999-04-06)
> 
> echo [-neE] [arg ...]
>     Output the args, separated by spaces.  The return status is always 0.
>     If -n is  specified, the trailing newline is suppressed.  If the -e
>     option is given, interpretation of the following backslash-escaped
>     characters is enabled.  The -E option disables the interpretation of
>     these escape characters, even on systems where they are interpreted
>     by default.
>        ^^^^^^^^
> Bash (as distributed by RedHat) is configured NOT to recognize escaped
> (\) characters. There is an option (--enable-usg-echo-default) to change
> that when compiling bash. An alternative is to alias echo to "echo -e".
> 
> I don't think that the Cygwin people (i.e. Corinna) should change
> anything. I think that Linux is our model system and the current
> defaults are satisfactory.
> 
> BTW. I don't use ash, and I changed my Cygwin sh to be bash. (I know it
>      is a little slower, but I want to be sure that my scripts work the
>      way it works on Linux)
> 
> Ehud.
> 
> 
> -- 
>  Ehud Karni     Mivtach - Simon  Insurance   /"\
>  Tel: +972-3-7966-561 Fax: +972-3-7966-667   \ /  ASCII Ribbon Campaign
>  (USA) Fax and  voice  mail: 1-815-5509341    X   Against  HTML  Mail
>      Better     Safe     Than     Sorry      / \
>      mailto:ehud AT unix DOT simonwiesel DOT co DOT il    http://www.simonwiesel.co.il
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/

-- 
Slowly and surely the unix crept up on the Nintendo user ...
Wayne Willcox                          I will not eat green eggs and ham
wayne AT reliant DOT immure DOT com                     I will not eat them Sam I Am!!
A wise person makes his own decisions, a weak one obeys public opinion.
                -- Chinese proverb

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019