help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Is the usage " address@hidden:3:$i}" documented


From: Peng Yu
Subject: Re: [Help-bash] Is the usage " address@hidden:3:$i}" documented
Date: Wed, 1 Apr 2015 15:52:05 -0500

On Wed, Apr 1, 2015 at 3:48 PM, Greg Wooledge <address@hidden> wrote:
> On Wed, Apr 01, 2015 at 03:41:43PM -0500, Peng Yu wrote:
>> I use regex to search for ":.*:", but I only find
>> ${parameter:offset:length} in the manpage.
>>
>> Where is the usage of something like " address@hidden:3:$i}" documented?
>
> Read the section you already found.
>
> Parameter Expansion
> ...
>       ${parameter:offset:length}
>            Substring Expansion.

It would be better say here not only just Substring Expansion but also
array subsettng or something like. It is critically to have a topic
sentence when one writes for regular document. This principle should
applies to bash document as well.

http://examples.yourdictionary.com/examples-of-topic-sentences.html

>  Expands to up to length characters of the
>            value of parameter starting at the character specified by offset.
>            ...
>            If parameter is an indexed array name subscripted by @ or *, the
>            result is the length members of the array beginning with
>            ${parameter[offset]}.  A negative offset is taken relative to one
>            greater than the maximum index of the specified array.  It is an
>            expansion error if length evaluates to a number less than zero.
>            ...



-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]