Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unix 我想在比赛后使用grep显示行内容_Unix - Fatal编程技术网

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).