[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] echo -n is not portable and used too much

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2002-02-12 01:02:51 CET

On Mon, 2002-02-11 at 18:48, Blair Zajac wrote:
> 1) Have a echo wrapper that figures this out for us.
> 2) Use the printf executable. Does every OS have this?

printf is in POSIX 2 and is present on basically every modern Unix
(*BSD, Linux-based, Solaris 8, IRIX 6.5, Tru64 V5.0, HPUX B.10.20, AIX
3). We'd be shutting out older systems, though, if there are any that
can compile Subversion (SunOS 4.x with gcc?).

The particular tr trick advocated by Kirby Bohling is poor because it
embeds NUL characters in the output, although "tr -d '\012'" might
serve.

All a question of just how much ugliness we want to spend on being
portable.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:06 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.