From owner-freebsd-current Wed Oct 21 13:08:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA03626 for freebsd-current-outgoing; Wed, 21 Oct 1998 13:08:33 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from schuimpje.snt.utwente.nl (schuimpje.snt.utwente.nl [130.89.238.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA03618 for ; Wed, 21 Oct 1998 13:08:31 -0700 (PDT) (envelope-from gelderen@mediaport.org) Received: from wit395301.student.utwente.nl ([130.89.235.121]:37640 "HELO deskfix" ident: "NO-IDENT-SERVICE[2]") by schuimpje.snt.utwente.nl with SMTP id <7999-26621>; Wed, 21 Oct 1998 22:07:51 +0200 Message-ID: <00b701bdfd2e$7b29c5a0$1400000a@deskfix.local> From: "Jeroen C. van Gelderen" To: Subject: echo behaviour Date: Wed, 21 Oct 1998 22:07:50 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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... Last but not least: is this the correct list? Cheers, Jeroen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message