ADSM-L

Re: Need a quick help on a script.

2004-03-22 17:28:23
Subject: Re: Need a quick help on a script.
From: "Stephen E. Bacher" <seb AT DRAPER DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 22 Mar 2004 17:27:56 -0500
"Doyle, Patrick" <pat.doyle AT EAGLESTAR DOT IE> wrote:

>Have you tried this with your shell?
>
>substring=${bigstring:0,2}
>
>
>${parameter:offset}
>${parameter:offset:length}
>Expands to up to length characters of parameter starting at the character
>specified by offset. If length is omitted, expands to the substring of
>parameter starting at the character specified by offset. length and offset
>are arithmetic expressions (see section 6.5 Shell Arithmetic). This is
>referred to as Substring Expansion.

What shell are you using?  This does not work in Bourne, C, Korn or Bourne
Again shell as far as I can tell.

 - seb

<Prev in Thread] Current Thread [Next in Thread>