From owner-freebsd-hackers Sun Nov 9 08:06:20 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA18958 for hackers-outgoing; Sun, 9 Nov 1997 08:06:20 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from post.mail.demon.net (post-20.mail.demon.net [194.217.242.27]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id IAA18875 for ; Sun, 9 Nov 1997 08:06:15 -0800 (PST) (envelope-from fhackers@jraynard.demon.co.uk) Received: from jraynard.demon.co.uk ([158.152.42.77]) by post.mail.demon.net id aa2004303; 9 Nov 97 16:00 GMT Received: (from fhackers@localhost) by jraynard.demon.co.uk (8.8.7/8.8.7) id OAA10894; Sun, 9 Nov 1997 14:37:49 GMT (envelope-from fhackers) Message-ID: <19971109143748.29900@jraynard.demon.co.uk> Date: Sun, 9 Nov 1997 14:37:48 +0000 From: James Raynard To: Joerg Wunsch Cc: freebsd-hackers@freebsd.org Subject: Re: Why doesn't /bin/echo use getopt? References: <25358.879002601@axl.iafrica.com> <19971108175832.31362@jraynard.demon.co.uk> <19971109115007.JB56482@uriah.heep.sax.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81e In-Reply-To: <19971109115007.JB56482@uriah.heep.sax.de>; from J Wunsch on Sun, Nov 09, 1997 at 11:50:07AM +0100 Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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)? 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. [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/