This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Escape Character


On Fri, 4 Aug 2006, Franz Wolfhagen wrote:

> cygwin-owner@XXXXXX.XXX wrote on 04-08-2006 14:23:49:

<http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.

> > Hi
> >
> > I am new to Cygwin and I am just trying to use the escape character
> > example is
> >
> > echo "\t\t Hello"
> >
> > but this returns \t\t Hello and ignores the escape characters.
> >
> > I was looking for it to return Hello with a couple of TABS in front
> > like it does on our True64 unix system.  Is the escape character
> > differant in Cygwin or am I missing something ??? any help would be
> > great
>
> "man echo" has the answer - on Cygwin use the "-e" argument ie :  echo
> -e "\t\t Hello"

Almost correct, except that in bash, "echo" is a shell builtin, and you
should've been using "help echo" instead of "man echo".  Luckily, both
/bin/echo and bash's builtin understand the -e option.

It's usually a good idea to run "type COMMAND" first, to find out what
COMMAND is, to make sure you're looking at the right documentation.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]