row count

Hi,
I want a row count of a file incliding header and trailer
If I do cat Filename | wc -l
then I am only getting the row count excluding the header and trailer
Buit I want the row count including Header and trailer
Please help

Many thanks in advance,
Pragyan

wc -l filename 

will give you the total number of lines of your file.

I suspect your "header" or "footer" are a just a "long" line so it is dispayed on multiple lines on your screen whereas in fact is it just 1 line (if you edit your file and jump from line to line to may get aware of it)

Do your file containes the header & footer ? ... or are they added afterward some how ?

No,there is no header and trailor as of now,we need to append to the existing file

Thanks

cat header filename footer | wc -l

?