酷!學園
技術討論區 => Linux 討論版 => 主題作者是: cv86092 於 2008-03-24 17:52
-
各位先進好︰
目前我機房中有幾台Router,想用家中Linux主機,利用expect 自動遠端登入後,show 出一些我想查詢的數值,
(因為沒有這些數值的MIB),不知是否可以show出數值後,然後存入一暫存變數裡,等expect 跳出後,再行利用。
#expect: Router#show subs
telnet Router Router#100 $subs=100
ex: linux server------------> Router----------------->linux server------------>#echo $subscriber #$00
謝謝各位,或是有什麼其它的方法,請不吝指教。
-
用 tee -a file 導到一個檔案, 在去讀它