Philippe Blain [off-list ref] writes:
Thanks René and Johannes for two additional suggestions; both work correctly.
Junio, I retried yours and verified my quoting and I confirm it does not work.
I think I prefer René's suggestion.
Thanks all,
I see what was wrong with my variant.
We force IFS to be LF and nothing else upfront, which defeats the
attempt to split $variants at SP and turn them into "one token per
line" with "printf '%s\n' $variants | ..."
In any case, I find René's variant easier to follow, too.
Thanks, all.