[OT] Does "~" always point to $HOME?
freebsd at celestial.com
Fri Jan 26 17:18:45 UTC 2007
On Fri, Jan 26, 2007, Joerg Pernfuss wrote:
>On Fri, 26 Jan 2007 15:21:14 +0100
>Karol Kwiatkowski <karol.kwiat at 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.
INTERNET: bill at 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
More information about the freebsd-questions