sed
Hi all
I'm trying to achieve the following: Code:
echo "Enter the word: " it in sed (is sed the best tool for it)? Basically, I have large text files, and would like to search for particular worlds in them. Ideally providing the context as well (previous and next lines as well) Any help would be appreciated. thank you |
grep with the -A and -B args?
|
thanks, that's what I needed:)
|
Or, if you're lazy enough, -C :}
So, instead of e.g. "grep -A 3 -B 3 word file" just a "grep -C 6 word file" ;} Cheers, Tink |
All times are GMT -5. The time now is 05:38 PM. |