linux - how to combine two variable column-by-column in bash -
i have 2 variables, multi-line.
var1="1 2 3 4" var2="ao ad af ae"
i want
var3="1ao 2ad 3af 4ae"
i know can by:
echo "$var1" > /tmp/order echo "$var2" | paste /tmp/order -
but there way without temp file?
paste <(echo "$var1") <(echo "$var2") --delimiters ''
Comments
Post a Comment