2012-08-07 32 views
0

我在日誌文件中的內容,以顯示比賽之後的行內容S下方:我想用grep

Aug 02 22:01:18.0937 CDT Thread-4-610399 java.lang.IllegalStateException: perfdb_connectstring was not found in the supplied property file(s). 

我想要的輸出是在用grep命令所提供屬性文件(S)java.lang.IllegalStateException: perfdb_connectstring was not found

請儘快回覆。

回答

0

你真的需要使用'grep'嗎?如果日誌文件始終具有這種格式也許你應該用「一刀切」

cut -d" " -f6- file.log 

它將要stdout的正是輸出:

java.lang.IllegalStateException: perfdb_connectstring was not found in the supplied property file(s).