From owner-freebsd-current Wed Oct 21 13:35:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA07434 for freebsd-current-outgoing; Wed, 21 Oct 1998 13:35:53 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from picnic.mat.net (picnic.mat.net [206.246.122.117]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA07422 for ; Wed, 21 Oct 1998 13:35:51 -0700 (PDT) (envelope-from chuckr@mat.net) Received: from localhost (chuckr@localhost) by picnic.mat.net (8.9.1/8.8.5) with ESMTP id QAA28826; Wed, 21 Oct 1998 16:34:57 -0400 (EDT) Date: Wed, 21 Oct 1998 16:34:55 -0400 (EDT) From: Chuck Robey To: "Jeroen C. van Gelderen" cc: freebsd-current@FreeBSD.ORG Subject: Re: echo behaviour In-Reply-To: <00b701bdfd2e$7b29c5a0$1400000a@deskfix.local> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 21 Oct 1998, Jeroen C. van Gelderen wrote: > Hallo, > > Today I stumbled on the problem of building a 'cross-platform' shell script > for the sh shell. I noticed that the /bin/echo behaves differently then the > sh built-in echo in reacting to the "\c" escape. > > FreeBSD sh accepts "\c" only when the -e flag is specified. > FreeBSD /bin/echo accepts "\c" always and does not accept the -e flag > Solaris sh accepts "\c" always and does not accept the -e flag > Linux' built-in echo accepts "\c" only when the -e flag is specified. > > Why the inconsistency between the sh built-in and /bin/echo? Is it on > purpose? If so, shouldn't the man-page be updated to reflect the > inconsistency? If it's not on purpose: is conforming to the opengroup > 'Single UNIX' considered a good idea? I'll patch if neccessary, please tell > me what -if any- I should patch... You really ought to search the mailing list archives, this has been beaten to death quite often ... ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@glue.umd.edu | communications topic, C programming, and Unix. 213 Lakeside Drive Apt T-1 | Greenbelt, MD 20770 | I run Journey2 and picnic (FreeBSD-current) (301) 220-2114 | and jaunt (NetBSD). ----------------------------+----------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message