On 09 Jan 1998 15:00:44 +0200, <jari(_dot_)aalto(_at_)poboxes(_dot_)com> wrote:
ret = `expr "$VAR" : '\(.*\)..'`
<... or ...>
SHELL = /bin/ksh
ret = `echo ${VAR%??} ;` # semicolon to force invoking a shell
In the general case, you would expect expr to be +slightly+ less
costly than ksh to execute, but I remember your site had some rather
large and wild-looking binaries for some quite simple utilities so
YMMV :-)
/* era */
Reminds me of the old joke:
-rwx--x--x 1 root wheel 17 Jan 4 1939 expr
-rwx--x--x 1 bin bin 65536 Jun 17 1980 sh
-rws--x--x 1 root wheel9345897345 Apr 1 1997 ksh
(This was originally ed, vi, and emacs; I can't find the original now
but if you go looking for the phrase "ed is the standard editor" at
one of the search engines, you should find it.)
--
Paparazzi of the Net: No matter what you do to protect your privacy,
they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>