4 ms·
With lines.txt: printf '(%s)\n' "one two" "three four five" echo "How you doin'?" Running: while read -r line; do eval command=($line) command+
by databasher 2y ago
With lines.txt:
printf '(%s)\n' "one two" "three four five"
echo "How you doin'?"
Running:
while read -r line; do
eval command=($line)
command+=("arg with spaces" "other arg")
"${command[@]}"
done < lines.txt
Yields
(one two)
(three four five)
(arg with spaces)
(other arg)
How you doin'? arg with spaces other arg