[Top][All Lists]

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

Re: `${@:0}' expands to `$0 $1 ...', even though `$0' is not a positiona

From: Chet Ramey
Subject: Re: `${@:0}' expands to `$0 $1 ...', even though `$0' is not a positional parameter
Date: Wed, 3 Mar 2021 10:04:02 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

On 3/3/21 9:59 AM, Oğuz wrote:
The manual says:
A positional parameter is a parameter denoted by one or more
digits, other than the single digit 0.

And about `${@:offset:length}', this is what's written there:
If parameter is @, the result is length positional
parameters beginning at offset.

"If offset is 0, and the positional parameters are  used,
 $0 is prefixed to the list."

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

reply via email to

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