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

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -