title: Output formatting in Bash
body: <pre><code>echo "Station pairs are $station1($code1) and $station2($code2) | distance=$c degrees or `echo $c|awk '{print $1*111.2}'` km"
  </code></pre>
  
  <p>I'm running the aforementioned code within a 'for' loop in bash.The variables 'station1','code1','station2','code2'
  are changing after each iteration of the loop and it gives me an output like this:</p>
  
  <pre><code>Station pairs are Zhozho2(WT15) and Guoban(WT19) | distance=1.4755108271 degrees or 164.077 km
  Station pairs are Zhozho2(WT15) and Yarla(WT20) | distance=1.63208637417 degrees or 181.488 km
  Station pairs are Zhozho2(WT15) and Zhungba(ZNBA) | distance=1.28887286927 degrees or 143.323 km
  Station pairs are Hill(WT16) and N-Napuk(WT17) | distance=1.22929482902 degrees or 136.698 km
  Station pairs are Hill(WT16) and Zhungba(ZNBA) | distance=1.87133807827 degrees or 208.093 km
  Station pairs are N-Napuk(WT17) and Barkar(WT18) | distance=1.73933270787 degrees or 193.414 km
  </code></pre>
  
  <p>How to print those lines in such a way that my output looks like this:</p>
  
  <pre><code>Station pairs are Zhozho2(WT15)  and Guoban(WT19)  | distance=1.4755108271   degrees or 164.077 km
  Station pairs are Zhozho2(WT15)  and Yarla(WT20)   | distance=1.63208637417  degrees or 181.488 km
  Station pairs are Zhozho2(WT15)  and Zhungba(ZNBA) | distance=1.28887286927  degrees or 143.323 km
  Station pairs are Hill(WT16)     and N-Napuk(WT17) | distance=1.22929482902  degrees or 136.698 km
  Station pairs are Hill(WT16)     and Zhungba(ZNBA) | distance=1.87133807827  degrees or 208.093 km
  Station pairs are N-Napuk(WT17)  and Barkar(WT18)  | distance=1.73933270787  degrees or 193.414 km
  </code></pre>