how to insert new line in bash shell for variable??

Posted by puspa on Stack Overflow See other posts from Stack Overflow or by puspa
Published on 2010-06-11T06:05:30Z Indexed on 2010/06/11 6:12 UTC
Read the original article Hit count: 337

Filed under:

I have two variables var1 and var2. The contents of each variables come from bash shell grep command.

echo $var1 prints
123 465 326 8080

echo $var2 prints
sila kiran hinal juku

Now I want to print the above into following formats in Linux bash shell

123 sila
465 kiran
326 hinal
8080 juku

So how can I print this way in bash shell??

© Stack Overflow or respective owner

Related posts about bash