Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Nov 1997 14:37:48 +0000
From:      James Raynard <fhackers@jraynard.demon.co.uk>
To:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Why doesn't /bin/echo use getopt?
Message-ID:  <19971109143748.29900@jraynard.demon.co.uk>
In-Reply-To: <19971109115007.JB56482@uriah.heep.sax.de>; from J Wunsch on Sun, Nov 09, 1997 at 11:50:07AM %2B0100
References:  <25358.879002601@axl.iafrica.com> <19971108175832.31362@jraynard.demon.co.uk> <19971109115007.JB56482@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 09, 1997 at 11:50:07AM +0100, J Wunsch wrote:
> As James Raynard wrote:
> 
> Tough question: how do you echo a "-n\n" then (without using
> printf(1), of course)?

<quote>
The only tricky case is echoing -n followed by a newline:

$ echo -n '-n
> '
-n
$

It's ugly, but it works, and this is a rare situation anyway.
</quote>

[The Unix Programming Environment, Kernighan and Pike]

-- 
In theory, theory is better than practice.  In practice, it isn't.
James Raynard, Edinburgh, Scotland.   http://www.freebsd.org/~jraynard/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971109143748.29900>