Date: Sat, 11 Apr 2009 19:28:58 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: Karl Vogel <vogelke+unix@pobox.com> Cc: freebsd-questions@freebsd.org Subject: Re: sorta newb help compiling samba Message-ID: <alpine.BSF.2.00.0904111927050.4460@wonkity.com> In-Reply-To: <20090411003758.D80D0BE71@kev.msw.wpafb.af.mil> References: <20090411003758.D80D0BE71@kev.msw.wpafb.af.mil>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 10 Apr 2009, Karl Vogel wrote:
>>> On Fri, 10 Apr 2009 21:44:14 +0200,
>>> Polytropon <freebsd@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0904111927050.4460>
