This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: cygiwn newline character
- To: "Robinow, David" <drobinow at dayton dot adroit dot com>
- Subject: Re: cygiwn newline character
- From: Wayne Willcox <wayne at reliant dot knighthammer dot com>
- Date: Fri, 19 Oct 2001 07:51:18 -0500
- Cc: Cygwin <cygwin at cygwin dot com>
- References: <80575AFA5F0DD31197CE00805F650D7602D03B@wilber.adroit.com>
- Reply-To: Wayne Willcox <wayne at reliant dot immure dot com>
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@reliant.knighthammer.com]
> > Sent: Thursday, October 18, 2001 4:13 PM
> > To: amihailo@shepherd.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@reliant.immure.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/