On Fri, 10 Apr 2009, Karl Vogel wrote:

On Fri, 10 Apr 2009 21:44:14 +0200,
Polytropon <free...@edvax.de> said:

P> Why don't you use echo -n which suppresses the newline instead of involving
P> another program to do something that echo can do on its own?  This is how
P> FreeBSD does it in its system scripts.

  Some of my scripts date back to 1994, and they've been run under FreeBSD,
  Linux, and Solaris using /bin/sh, ATT Korn shell, Solaris's version
  of the Korn shell (which is sure as hell *NOT* the same thing), pdksh,
  and bash.  Unfortunately, "echo -n" hasn't behaved consistently, so I
  used the (pretty gross) hack

     # echo without newline
     necho () {
       echo "$*" | tr -d '\012'

Some people recommend using printf instead.

-Warren Block * Rapid City, South Dakota USA
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to