Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: print entire array *with* subscript?
- X-seq: zsh-users 9913
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Justin M Wozniak <jwozniak@xxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: print entire array *with* subscript?
- Date: Sat, 11 Feb 2006 05:20:37 +0000
- In-reply-to: <Pine.GSO.4.58.0602102314580.139@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060210175012.GA10021@princo> <EXCHANGE03XHbQbilav0000bbe8@xxxxxxxxxxxxxxxxxx> <Pine.GSO.4.58.0602102314580.139@xxxxxxxxxx>
On Feb 10, 11:15pm, Justin M Wozniak wrote:
}
} In your solution, what is the point of (r) ?
Subscript Flags
---------------
If the opening bracket, or the comma in a range, in any subscript
expression is directly followed by an opening parenthesis, the string up
to the matching closing one is considered to be a list of flags, as in
`NAME[(FLAGS)EXP]'. The flags currently understood are:
...
r
Reverse subscripting: if this flag is given, the EXP is taken as a
pattern and the result is the first matching array element,
substring or word (if the parameter is an array, if it is a
scalar, or if it is a scalar and the `w' flag is given,
respectively). ...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author