How to use the grep result in command line?
When I use grep to find some texts which I need, it will display lines
containing a match to the given pattern.
For example,
# grep -r ".*Linux" *
path0/output.txt:I hope you enjoyed working on Linux.
path1/output1.txt:Welcome to Linux.
path2/output2.txt:I hope you will have fun with Linux.
then, I want to edit the path2/output2.txt, hence, I type vim
path2/output2.txt.
But, I think it doesn't a effective way.
How can I copy the path after grep?
No comments:
Post a Comment