I would like to have 2 status report that are next to each other but I dont want them to move, I want them to have a static position.
This what I use to merge:
paste -d, Status_Report_0.csv Status_Report_1.csv > Status_Report_Final.csv
column < Status_Report_Final.csv
EDIT1
so for clarification I wrote an example code I know I'm not using the merging of the echo's efficient but it works for me
(code is not able to paste correct...)
while(true)
do
for i in 0 1
do
echo "==============================================================" > temp0_"$i".csv
echo -e "\033[1;34mround 432\033[0m" > temp1_"$i".csv
echo -e "\033[1;34mpinged 345 total times \033[0m\n----" > temp2_"$i".csv
echo -e "\033[1;32mconnected 43 total times \033[0m" > temp3_"$i".csv
echo -e "\033[0;37mdisconnected 304 total times\033[0m" > temp4_"$i".csv
echo -e "\033[0;37mdisconnected 23 last time\033[0m\n----" > temp5_"$i".csv
echo -e "package-loss 88% \n----" > temp6_"$i".csv
cat temp0_"$i".csv temp1_"$i".csv temp2_"$i".csv temp3_"$i".csv temp4_"$i".csv temp5_"$i".csv temp6_"$i".csv > Status_Report_"$i".csv
rm -f temp0_"$i".csv temp1_"$i".csv temp2_"$i".csv temp3_"$i".csv temp4_"$i".csv temp5_"$i".csv temp5_"$i".csv
done
cat Status_Report_0.csv Status_Report_1.csv > Status_Report_Final.csv
column < Status_Report_Final.csv
done
printf("%-40s\n")
. It requires multiple passes to find the longest line in the file, and set that as the width, or you can get the display width and halve it. If you go with a fixed width you might also want to print...
or>
on lines that are too long. You could do that in both files. For 2 files being preformatted, the bash construct<()
will be useful.