I tried using awk the way you suggested but this also gives me only one line which is the one having the word Name in it.
I wanted to know the number of lines after this line
You have to change the ending statement to something that is in the file -
Example:
cat myfile
First line
Name line
another line
even more lines
ending line
$ cat myfile |awk /"Name"/,/"even"/ |wc -l
3
So it's going to count the Name line, another line, and the last line - set the output of wc to a variable and minus 1 - but you need to put an ending statement in the awk parameters that is in your file or put something that won't ever be there (in this next example "neverfindthisword" ) and it will count all lines after (including) the Name line
Yes, sorry. I posted that then quickly deleted that after I realized it was flat out wrong. You probably should use sed. Use Name as the first address and the end of the file as the second (Not sure how to do that - maybe others here know). Then count the lines in between.