Comment # 11 on bug 953149 from
A general recommendation when doing

read X Y Z < <(output of a command)

it is fail-safe programming to always add a dummy variable
where possibly trailing junk gets stored.

On my SLE11 system (with bash-3.2):

bad (probably "3.9" is unexpected):
-----------------------------------------------------------------------------
# ( IFS=. read maj min < <(rpm -q --qf "%{version}" cups) ; \
 echo maj:$maj min:$min )

maj:1 min:3.9
-----------------------------------------------------------------------------

good:
-----------------------------------------------------------------------------
# ( IFS=. read maj min junk < <(rpm -q --qf "%{version}" cups) ; \
 echo maj:$maj min:$min )

maj:1 min:3
-----------------------------------------------------------------------------


You are receiving this mail because: