11

appending text to a file

view full story
linux-howto

http://www.unix.com – I am trying to count number of record in a file and then append a trailer to that file. Trailer should e in the format as below T| <count of records> count of records ---> this count should be one less than the actual count obtained, as the file will have a header. I have drafted a script as below count = wc - l $fn ---> $fn will provide the file name count = $count - 1 ---> actual count - 1 I don't know how to create the trailer with the count. Please help me out. Thanks in advance. (HowTos)