Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jan 2007 09:22:44 -0800
From:      Bill Campbell <freebsd@celestial.com>
To:        freebsd-questions@freebsd.org, Bill Campbell <freebsd@celestial.com>
Subject:   Re: [OT] Does "~" always point to $HOME?
Message-ID:  <20070126172244.GB6575@ayn.mi.celestial.com>
In-Reply-To: <20070126160107.0e5c8646@loki.starkstrom.lan>
References:  <Pine.LNX.4.43.0701251138500.18233@hymn07.u.washington.edu> <ba29b9b40701252251p1e6df8f1xcded017655acbcb2@mail.gmail.com> <20070126070730.GA10081@ayn.mi.celestial.com> <45BA0E5A.6030503@gmail.com> <20070126160107.0e5c8646@loki.starkstrom.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 26, 2007, Joerg Pernfuss wrote:
>On Fri, 26 Jan 2007 15:21:14 +0100
>Karol Kwiatkowski <karol.kwiat@gmail.com> 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



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