mknod /tmp/oracle.pipe p sqlplus / as sysdba << _EOF set escape on host nohup gzip -c < /tmp/oracle.pipe > /tmp/out1.gz \& spool /tmp/oracle.pipe select * from employee; spool off _EOF rm /tmp/oracle.pip
I need to insert a trailer at the end of the zipped file out1.gz , I can count the lines using
count=zcat out1.gz |wc -l
How do i insert the trailer
T5 (assuming count=5)
At the end of out1.gz without unzipping it.