ADSM-L

Re: Need a quick help on a script.

2004-03-25 04:31:45
Subject: Re: Need a quick help on a script.
From: "Doyle, Patrick" <pat.doyle AT EAGLESTAR DOT IE>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Thu, 25 Mar 2004 09:17:18 +0000
BASH
http://www.gnu.org/software/bash/manual/bashref.html


-----Original Message-----
From: Stephen E. Bacher [mailto:seb AT DRAPER DOT COM]
Sent: 22 March 2004 22:28
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: Need a quick help on a script.


"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


**********************************************************************
The contents of this e-mail and possible associated attachments
are for the addressee only. The integrity of this non-encrypted
message cannot be guaranteed on the internet.
Eagle Star Insurance Company (Ireland) Limited is therefore
not responsible for the contents. If you are not the intended recipient,
please delete this e-mail and notify the sender

**********************************************************************

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