如何在比赛后改变单词?

时间:2014-03-07 12:47:30

标签: bash shell sed

我想在比赛后删除单词:

我想更改以下行:

Assertion failed: FILE: ../../test.cpp LINE: 350: error message:

到此:

Assertion failed: FILE: ../../test.cpp LINE: error message:

1 个答案:

答案 0 :(得分:2)

怎么样:

$ echo "Assertion failed: FILE: ../../test.cpp LINE: 350: error message:" \
   | sed 's/LINE: [^ ]*/LINE:/'
Assertion failed: FILE: ../../test.cpp LINE: error message: