How to add header and footer to the flat file

view full story

http://unix.stackexchange.com – I need to add a header and a footer to flat file - I just need to get values from the parameter like system date and report run date in the top line and for the footer I need to get the record count and prepend 00000 to it as shown below: Header: "A" "F" "2012-03-01" "20120229" Footer: "$M" "0000001252" "." "0000" How can I achieve this in Unix? (HowTos)