linux - awk print two variables on the same line -
i need use awk print 2 variables on same line
foo=multiline pattern bar=multiline pattern awk -v foo="$foo" -v bar="$bar" 'begin {print foo bar}'
this output:
foo1 foo2 foo3 bar1 bar2 bar3
i need get
foo1 bar1 foo2 bar2 foo3 bar3
you can use paste
side-by-side output:
paste <(echo "$foo") <(echo "$bar")
Comments
Post a Comment