Unix 我想在比赛后使用grep显示行内容
我的日志文件中有以下内容:Unix 我想在比赛后使用grep显示行内容,unix,Unix,我的日志文件中有以下内容: Aug 02 22:01:18.0937 CDT Thread-4-610399 java.lang.IllegalStateException: perfdb_connectstring was not found in the supplied property file(s). 我希望输出为java.lang.IllegalStateException:perfdb_connectstring在使用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).
我希望输出为java.lang.IllegalStateException:perfdb_connectstring在使用grep命令提供的属性文件中未找到
请尽快回复。您真的需要使用“grep”吗?如果日志文件始终采用这种格式,则可能应该使用“剪切”
cut -d" " -f6- file.log
它将准确输出您想要输出的内容:
java.lang.IllegalStateException: perfdb_connectstring was not found in the supplied property file(s).