I'm trying to write a script which runs various commands and outputs the result of each command into one column but I'm not able to get the output ot be displayed in colums.
#!/bin/bash
# Get GBP Neighbour NAMES
NEIGHBOR=$(vtysh -c 'show ip bgp neighbors' | grep Incoming | awk '{print $7}')
# Get IPs of BGP neighbours
IP=$(vtysh -c 'show ip bgp summary' | awk '{print $1}' | head -n -2 | tail -n +6)
# Get Up/Down time
TIME=$(vtysh -c 'show ip bgp summary' | awk '{print $9}' | head -n -2 | tail -n +6)
# Get State/PfxRcd
STATE=$(vtysh -c 'show ip bgp summary' | awk '{print $10}' | head -n -2 | tail -n +6)
How can I get the output to be separated in columns such as:
NEIGHBOR | IP | TIME | STATE