| delorie.com/archives/browse.cgi | search |
| 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 07:51:18 -0500 |
| From: | Wayne Willcox <wayne AT reliant DOT knighthammer DOT com> |
| To: | "Robinow, David" <drobinow AT dayton DOT adroit DOT com> |
| Cc: | Cygwin <cygwin AT cygwin DOT com> |
| Subject: | Re: cygiwn newline character |
| Message-ID: | <20011019075118.B99095@reliant.immure.com> |
| Reply-To: | Wayne Willcox <wayne AT reliant DOT immure DOT com> |
| References: | <80575AFA5F0DD31197CE00805F650D7602D03B AT wilber DOT adroit DOT com> |
| Mime-Version: | 1.0 |
| X-Mailer: | Mutt 1.0pre2i |
| In-Reply-To: | <80575AFA5F0DD31197CE00805F650D7602D03B@wilber.adroit.com> |
| X-Operating-System: | FreeBSD reliant.knighthammer.com 3.5-STABLE FreeBSD 3.5-STABLE |
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.
On Thu, Oct 18, 2001 at 06:07:43PM -0400, Robinow, David wrote:
> This is getting crazier and crazier.
>
> #!/bin/sh
> echo -e hello world '\t' hi there
New option for no good reason but to break compatibility
>
> OR
>
> #!/bin/bash
> echo hello world $'\t' hi there
new syntax also breaks compatibility I would not recommand using this
either.
>
> OR
>
> #!/bin/bash
> /bin/echo hello world $'\t' hi there
>
> OR
>
> #!/bin/tcsh
> echo hello world '\t' hi there
>
> But NOT
>
> #!/bin/tcsh
> /bin/echo hello world '\t' hi there
>
> Interesting facts:
> 1) /bin/sh on cygwin does not have the same features
> as /bin/sh on many familiar unix systems.
>
> 2) bash is documented (man bash !) and behaves like
> bash on many familiar unix systems.
>
> 3) echo is a shell builtin. It is a mistake to talk
> about the "cygwin echo" unless you mean /bin/echo
>
> 4) It's spelled "cygwin" not "cygiwn"
>
> 5) This thread has nothing to do with newlines.
>
> 6) tcsh programming is harmful.
>
> > -----Original Message-----
> > From: Wayne Willcox [mailto:wayne AT reliant DOT knighthammer DOT com]
> > Sent: Thursday, October 18, 2001 4:13 PM
> > To: amihailo AT shepherd DOT edu
> > Cc: hrishy; Cygwin
> > Subject: Re: cygiwn newline character
> >
> >
> > Why a $ this certainly will not work on AIX or FreeBSD both
> > of those systems
> > will return the following output.
> > hello world $ hi there
> >
> > Okay the tab is now being honored but you would have to cut the $.
> >
> > On Thu, Oct 18, 2001 at 01:06:29PM -0400, Alec Mihailovs wrote:
> > > You should put a $ sign in front of '\t' :
> > >
> > > echo hello world $'\t' hi there
> > >
> > > Alec
> > >
> > > -----Original Message-----
> > >
> > > i am running the following programme under windows
> > > #!/bin/sh
> > > echo hello world '\t' hi there
> > >
> > > i am getting the output as hello world '\t' hi there
> > >
> > > wheras i require the output to be
> > > hello word hi there
> > > Hrishy
>
>
> --
> 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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |