delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/05/29/20:00:50

X-Spam-Check-By: sourceware.org
Message-ID: <465CBEB2.7030504@byu.net>
Date: Tue, 29 May 2007 18:00:50 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: echo with no line feed
References: <4657D057 DOT 4090502 AT earthlink DOT net> <20070526145859 DOT GA3313 AT ednor DOT casa DOT cgf DOT cx> <n2m-g DOT 325e20f89d73c895d99cc7a3cc71263f AT crystal DOT laburec DOT de> <46585D7D DOT 1070805 AT earthlink DOT net> <20070526170712 DOT GA18329 AT trixie DOT casa DOT cgf DOT cx> <4658FB50 DOT 8060101 AT earthlink DOT net> <4658FCBB DOT 8030909 AT earthlink DOT net> <Pine DOT GSO DOT 4 DOT 63 DOT 0705291033250 DOT 29943 AT access1 DOT cims DOT nyu DOT edu>
In-Reply-To: <Pine.GSO.4.63.0705291033250.29943@access1.cims.nyu.edu>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

-----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 AT byu DOT 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/

- Raw text -


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