我写了一个小脚本会从服务器日志的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
在服务器上还是在客户端? –