Subject: Re: A shell gotcha
To: Aleksi Suhonen <email@example.com>
From: Greg Spiegelberg <firstname.lastname@example.org>
Date: 04/16/1995 22:15:08
Aleksi Suhonen said something not totally unlike...
|In message 199504151750.NAA02928@jfwhome.funhouse.com "John F. Woods" told
|}-The obvious solution was to figure out how to arrange for the .aliases
|}-file not to make /bin/sh choke. After many false starts, I discovered
|}-that pdksh defines an environment variable "KSH_VERSION", which makes
|}-a handy test for which shell is running the script. (The ksh syntax
|}-has to be kept out of the file, so I "dot" the ksh specific stuff.)
|}-It turns out that zsh (what I'd been using for a while) also defines a
|}-version variable ("ZSH_VERSION"), making a three-way split easy to
|}-arrange. For csh fans, tcsh defines a "version" variable.
|Actually Older versions of zsh used an entirely different variable
|for version. (But I don't remember which one ... :( )
A bit offtrack here but I just found a command that'll kill csh that comes
with SunOS 4 & 5 and was wondering if it does the same on NetBSD and see
if anyone has reasons for it or a way to patch or avoid it aside from not
BTW, I don't have NetBSD up and running right now so that's why I'm asking.
Greg "TwoTone" Spiegelberg I'm not mental...
SAIC UNIX/Netware Computer Type Guy I'm just on higher philosophical
email@example.com plane, so GET OFF MY BACK!