【发布时间】:2012-02-12 03:55:53
【问题描述】:
我自己尝试过以下方法:
for i in $(grep something toprefix.log); do sed -i -e 's/^/prefix/' $i; done
首先,为你的愚蠢道歉——我知道上面的方法行不通!
基本上,我想使用 grep、sed 或 awk 为日志文件中的匹配行应用前缀。
prefix-matching
prefix-matching
not-matching
prefix-matching
not-matching
not-matching
prefix-matching
提前致谢。
【问题讨论】: