I am pretty new to regular expressions. I've been trying to use 'grep' alongside with regular expressions to extract a line from a file. I thought some of you might help:
My file has the lines:
c total length of integration
ntotal= 0
c total number of updates
ntotal= 20
c total number of outputs
ntotal= 10
So I was wondering how do I extract the first occurrence of 'ntotal= 0'
I tried with grep ^c.*tot.*\n? 'filename'
, but that did not work.
Any ideas?
Regards,
Abedin