From owner-freebsd-questions@FreeBSD.ORG Fri Jan 26 17:18:45 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C0D916A402 for ; Fri, 26 Jan 2007 17:18:45 +0000 (UTC) (envelope-from bill@ayn.mi.celestial.com) Received: from ayn.mi.celestial.com (hayek.celestial.com [192.136.111.12]) by mx1.freebsd.org (Postfix) with ESMTP id 50B2213C484 for ; Fri, 26 Jan 2007 17:18:45 +0000 (UTC) (envelope-from bill@ayn.mi.celestial.com) Received: from localhost (localhost [127.0.0.1]) by ayn.mi.celestial.com (Postfix) with ESMTP id 4B3076860B908; Fri, 26 Jan 2007 09:22:44 -0800 (PST) X-Virus-Scanned: amavisd-new at mi.celestial.com Received: from ayn.mi.celestial.com ([127.0.0.1]) by localhost (ayn.mi.celestial.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZeLN9hXNIAoE; Fri, 26 Jan 2007 09:22:44 -0800 (PST) Received: by ayn.mi.celestial.com (Postfix, from userid 203) id 2F0FC6800A4F4; Fri, 26 Jan 2007 09:22:44 -0800 (PST) Date: Fri, 26 Jan 2007 09:22:44 -0800 From: Bill Campbell To: freebsd-questions@freebsd.org, Bill Campbell Message-ID: <20070126172244.GB6575@ayn.mi.celestial.com> Mail-Followup-To: freebsd-questions@freebsd.org, Bill Campbell References: <20070126070730.GA10081@ayn.mi.celestial.com> <45BA0E5A.6030503@gmail.com> <20070126160107.0e5c8646@loki.starkstrom.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070126160107.0e5c8646@loki.starkstrom.lan> User-Agent: Mutt/1.5.11 OpenPKG/2.5 Cc: Subject: Re: [OT] Does "~" always point to $HOME? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@celestial.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 17:18:45 -0000 On Fri, Jan 26, 2007, Joerg Pernfuss wrote: >On Fri, 26 Jan 2007 15:21:14 +0100 >Karol Kwiatkowski wrote: > >> > While that's true for most shells, bash, csh, tcsh, etc., it >> > doesn't work on true Bourne /bin/sh shells (e.g. SCO OpenServer >> > 5.0.6a and earlier and probably others with Bell Labs ancestors). >> >> Not sure what I'm missing, is FreeBSD's /bin/sh shell not "true" >> Bourne Shell? Was it extended in some way from traditional one? > >FreeBSD /bin/sh is actually an ash, which roughly translates into >a POSIX shell with a few additions that do not break compatibility. >At least that is how I understood it. My point isn't whether the FreeBSD /bin/sh expands it, but that not all systems are FreeBSD, and that one can have problems on other *NIX systems. Knowing where there may be differences, and avoiding the assumptions that a program behaves the same on all systems, can help writing code that's portable without surprises. One of the major reasons I have been using GNU utilities on Unix systems for twenty-plus years, built with the ``g'' prefix, is to have a common set of programs which behave the same regardless of platform. Stallman would probably say I ran GNU/Xenix, GNU/SunOS, GNU/OpenServer, etc. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``Most people, sometime in their lives, stumble across truth. Most jump up, brush themselves off, and hurry on about their business as if nothing had happened.'' - Sir Winston Churchill