Thanks Cragun for the response.
No, its not a homework, It just came to mind and i was on it.
May be its a silly one and currently its not striking me.
Here are the ones i have tried but its not working.
D1: grep 'Romeo * Rom ' togrep
D1: grep 'Romeo * Rom' togrep
D1: grep "Romeo * Rom" togrep
D1: grep "Romeo * Rom " togrep
D1: egrep 'Romeo | Rom' togrep
Rom is in Romeo
Romeo is in Rome
D1: grep Romeo togrep | grep Rom
Rom is in Romeo
Romeo is in Rome
For these two lines of input, any of the following will select only the 2nd line:
grep '^Rome' togrep
grep 'e$' togrep
grep 'o i' togrep
If there is other input that needs to be rejected, or criteria other than just "grep, so that only last line would be the outcome" from the two line input file:
Rome is in Romeo
Romeo is in Rome
you need to provide much clearer requirements for what you are trying to do.
Apologies for not being clear while mentioning my requirement.
yes actually there were number of other inputs as well those were to be rejected.
Anyways thanks for the help !!
Will try to be more clear and precise next time onwards.