我寫了一個小腳本會從服務器日誌的egrep沒有得到結果
pattern - 'Unable to resolve location classpath:db/migration|Processing PersistenceUnitInfo'
代碼egrep
兩種模式片斷
#/bin/sh
ssh [email protected] egrep -e 'Unable to resolve location classpath:db/migration|Processing PersistenceUnitInfo' /usr/local/dd/logs/ddservice.log
結果的執行
bash: Processing: command not found
grep: to: No such file or directory
grep: resolve: No such file or directory
grep: location: No such file or directory
grep: classpath:db/migration: No such file or directory
的事實上有幾個關鍵詞屬於上述模式。我如何修改腳本來獲取模式。
你要到SSH服務器上運行'egrep'命令,或在SSH命令後你的身邊? –
首先我將建立連接到服務器,一旦建立,我打算運行egrep命令 – Arun
在服務器上還是在客戶端? –