0
我有多個命令,我希望以列的形式輸出每個命令的輸出。將不同命令的輸出並行排列成列
這裏是命令輸出I有:
echo "Batch 1 list" >> out.txt
ssh -T [email protected] "echo 'DIS CLUSQMGR(*)'|runmqsc" |awk -F'[()]' '{print $2}' >> out.txt
echo "===============================================================">> out.txt
echo "Batch 2 list" >> out.txt
ssh -T [email protected] "echo 'DIS CLUSQMGR(*)'|runmqsc" |awk -F'[()]' '{print $2}' >> out.txt
echo "===============================================================">> out.txt
echo "Batch 3 list">> out.txt
ssh -T [email protected] "echo 'DIS CLUSQMGR(*)'|runmqsc" | awk -F'[()]' '{print $2}' >> out.txt
echo "===============================================================">> out.txt
這裏是輸出:
Batch list
F111
F211
F311
F411
F511
F9P1
F9P4
F9P6
F9P7
FA11
===============================================================
Batch 2 list
A111
B211
V311
F411
B511
B9P1
NA11
FB11
CD11
===============================================================
batch 2 list
C111
C211
R311
Y411
E511
B9P1
EA11
AB11
ND11
我希望看到這種格式輸出:
Batch 1 list(count) Batch 2 list(count) Batch 3 list(count)
F111 A111 C111
F211 B211 C211
F311 V311 R311
F411 F411 Y411
F511 B511 E511
F9P1 B9P1 B9P1
F9P4 NA11 EA11
F9P6 FB11 AB11
F9P7 CD11 ND11
FA11
計數是該列中的條目數。
輸出不乾淨或未對齊到彩色。我用列-t來格式化,我可以使用它。謝謝 – MO12