help-bash
[Top][All Lists]
Advanced

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

Re: var-=1 command not found


From: Chet Ramey
Subject: Re: var-=1 command not found
Date: Thu, 1 May 2025 08:46:59 -0400
User-agent: Mozilla Thunderbird

On 4/30/25 7:16 PM, watael--- via wrote:

it could do nothing, but output a warning as it's not applyable(?) on "not- integers" but it could also be disturbing to be able to in/decrement (add/substract) integers, "concatenate" strings, but not remove the last element/string if it matches the indicated string. In a more or less near future, I could come back wondering why I can't. :D

You can already remove portions of strings with word expansion operators,
and it's fairly easy to write a function to, say, remove the last element
of an indexed array.

--
``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/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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