[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trick for saving and restoring $_ in trap handler.
From: |
Kaz Kylheku |
Subject: |
Re: Trick for saving and restoring $_ in trap handler. |
Date: |
Wed, 10 Apr 2024 06:10:34 -0700 |
User-agent: |
Roundcube Webmail/1.4.15 |
On 2024-04-10 01:23, Koichi Murase wrote:
> 2024年4月10日(水) 14:17 Kaz Kylheku <kaz@kylheku.com>:
>> trap 'uln_save=$_; handler; : "$uln_save"' ALRM
>
> I would do
>
> trap 'handler "$_"' SIGXXX
Yes, this is a nice reduction, also pointed
out by Janis Papagnou in the comp.unix.shell newsgroup.