Parsing with Vim
I have a 50 meg text file that I'm going to have to fish through to find certain lines and I was wondering if it's possible to parse it with vi so that I don't have to look through ever line. It would be nice if vi would find the lines and them copy them to another file or just group them all together. Is this something even possible with vi?
Here is a simple example: # textfile1.txt granted granted granted granted granted denied (I want this line moved to to textfile2.txt) granted # textfile2.txt denied If this isn't possible with Vim, I'd sure like some suggestions. Thanks! |
You could use grep to search the first file and then output the results to a second file. It would look something like this, depending on what you wanted to do:
grep "searchpattern" file1 > file2 |
miss crump, that's exactly what I'm looking for... Thank you so much... :)
|
All times are GMT -5. The time now is 01:02 PM. |