Re: Need a quick help on a script.
2004-03-22 17:28:23
"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
|
|
|