grep query to list 1 line [which is fixed] and the next line after it [variable text]
Hello,
How can I list the following with grep.
I want to extract 2 lines fron a text file
The fixed known part if it exists will static text and the text line after it will change.
A sample file
.
.
textline1
.
.
build: extracting built packages...
somename-2.6.36.3-16.1.i586.rpm
anothername2.6.36.3-16.1.i586.rpm
.
<eof>
In the above case it would return
build: extracting built packages...
somename-2.6.36.3-16.1.i586.rpm
If the fixed part does Not exist how can I return error code 1
Thanks Glenn
|