最佳答案
I'm trying to search and replace a string in all files matched by grep:
grep -n 'foo' *
will give me output in the form:
[filename]:[line number]:[text]
For each file returned by grep, I'd like to modify the file by replacing foo
with bar
.