0
我有多個線的命令,並找到細節AWK搜索和分析數據
runmqsc -cert -details -pw test1 -db 123.kdb -label "Mahendra1"
輸出:
label : mahendra1
issuer : cn=mahendra2, OS=abcd
subject :
----------
=mahendra3, os=hkjkj
Not Before : 10 oct 2013
not after : 20 oct 2014
現在我要提取從上述命令的發行者的值(mahendra2),並有下一個迭代命令。
runmqsc -cert -details -pw test1 -db 123.kdb -label "Mahendra2"
輸出:
label : mahendra2
issuer : cn=mahendra3, OS=abcd
subject :CN=mahendra4, os=hkjkj
Not Before : 10 oct 2014
not after : 20 oct 2015
在時刻發放者和對象值中的一個點將同。即可能5-6次迭代。
label : mahendra5
issuer : cn=mahendra6, OS=abcd
subject :CN=mahendra6, os=hkjkj
Not Before : 10 oct 2014
not after : 20 oct 2015
,有沒有辦法在awk來執行呢?
所以你想循環'runmqsc'命令,直到'issuer'和'subject'行匹配(或匹配'cn =')?或者你只想總共執行5-6次迭代?你想保留每次迭代的信息嗎?還是隻需要最後一個副本?你有什麼嘗試? – n0741337
是的,我想結束runmqsc命令的循環結束,直到發行者和主題行匹配 – Mahendra