[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/54292: sh local variable assignment broken
The following reply was made to PR bin/54292; it has been noted by GNATS.
From: Robert Elz <kre%munnari.OZ.AU@localhost>
Subject: Re: bin/54292: sh local variable assignment broken
Date: Thu, 13 Jun 2019 08:23:39 +0700
ps: Just in case it is not obvious, the correct usage is
local "x=$(echo 1 2 3)"
local x="$(echo 1 2 3)"
(whichever you prefer, they're essentially equivalent).
An alternative would be to empty IFS (or at least remove space)
before the command, so field splitting does not happen. (nb: not unset IFS).
Main Index |
Thread Index |