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: echo with no line feed


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Igor Peshansky on 5/29/2007 9:20 AM:
> '\c' is an escape sequence that prompts 'echo' to disable the trailing
> newline.  However, you have to tell 'echo' to look for escape sequences,
> i.e.,
> 
> echo -e "Type file name: \c"

Except that POSIX states that echo takes no options, so you are invoking
inherently non-portable behavior.  Better would be using printf(1) instead
of echo(1).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGXL6y84KuGfSFAYARApKrAKCCZjbrs7mlw2tgrH1V4dkIyZyk+gCeISjz
9ean3u69W92ONVPYvAY6RJ4=
=vzbd
-----END PGP SIGNATURE-----

--
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]