Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ulysses.UUCP
Path: utzoo!linus!gatech!ulysses!ggs
From: ggs@ulysses.UUCP (Griff Smith)
Newsgroups: net.unix
Subject: Re: KSH substring function (is it on your system?)
Message-ID: <1135@ulysses.UUCP>
Date: Fri, 8-Nov-85 21:26:35 EST
Article-I.D.: ulysses.1135
Posted: Fri Nov  8 21:26:35 1985
Date-Received: Sat, 9-Nov-85 06:05:44 EST
References: <121@rruxc.UUCP>
Organization: AT&T Bell Laboratories, Murray Hill
Lines: 29

> > Evidently substring has gone away in the latest ksh, maybe that's
> > why it is not in your manual - It's not in the latest manual here
> > either.
> This makes me very uncomfortable about using it.
> I have it (substring) here on a VAX (S5r2) and on my AT&T unixpc(S5r0) at home.
> I would be interested to know if netters have it on their KSH (even if it's
> not documented).  In particular, please email a message to me indicating what
> version of UN*X you're running and whether or not your KSH has substring.
> Thanks much.  I'll summarize to the net.  BTW, if anyone *knows* if substring
> has officially been dropped from KSH and why, please drop me a note.
> 
> Alex
> ..!{ihnp4,allegra}!rruxc!alex
> -- 
> 
>   Alex DeSimone @ Bell Communications Research
>   ..!{ihnp4,allegra}!rruxc!alex
> 

Enough!  Substring is dead, long live substring.  It has been replaced
by the substitution characters "#" and "%".  Assuming you have done
"var=abc.def", the command "echo ${var#abc.} ${var%.def}" will print
"def abc".
-- 

Griff Smith	AT&T Bell Laboratories, Murray Hill
Phone:		(201) 582-7736
Internet:	ggs@ulysses.uucp
UUCP:		ulysses!ggs  ( {allegra|ihnp4}!ulysses!ggs )