|
| From: | Martin Schulte |
| Subject: | Re: [PATCH] Add shopts for trailing newlines in command substitution and here strings |
| Date: | Wed, 27 Aug 2025 06:30:42 +0200 |
Hello Kevin!
Am Wed, 27 Aug 2025 13:26:08 +1000 schrieb Kevin Pulo <kevin.pulo@mongodb.com>:
> There are at least 3 common workarounds:
>
> foo=$(some_command ... ; rc=$? ; echo . ; exit $rc)
> rc=$?
> foo=${foo%.}
This can be written somewhat easier as
foo=$(some_command ...).
rc=$?
foo=${foo%.}
Best regards,
Martin
| [Prev in Thread] | Current Thread | [Next in Thread] |