Suicidaleggroll - I could do that if all I was looking for is a quick and tedious solution.
smallpond - Let me see if I can clear this us a little.
Code:
cat <file_list> | while read file_name; do
zcat $file_name | head -1 | while read hdr; do
echo $hdr | awk {something goes here, copy to $file_name}
done
zcat $file_name | tail -1 >> $file_name
file_list = a list of file names in a given directory (basically an array).
file_name = one of the files in "file_list" (basically a scalar). All of the files that are read to this var are compressed.
I hope this clears things up.
Two things to note here; 1 - I am not looking for a solution that "just" works (that's easy). 2 - I want clean efficient code that is reusable.