Basically, i have a bunch of commands in bash that are asking my machine the information of it.
Like:
> host=$(hostname -A)
hostname=$(hostname -I)
Pub_IP=$(dig +short
myip.opendns.com @resolver1.opendns.com)
Kernel_Version=$(uname -v | awk -F"Debian" '{print $2}' | cut -d ' ' -f2 | cut -d '-' -f1)
Deb_Version=$(cat /etc/debian_version)
I am also echoing it
echo $host $hostname $Pub_IP $Kernel_Version $Deb_Version > info.txt
What i need to figure out is how i can put |
between each of the parameter.
So if i look into my info.txt file, it would look something like
| debianmachine | output_of_hostname | output_of_Pub_IP |
Also, i might be able to do this with print?