I tried using the below command and i'm getting error:
file with data:
.TS
box;
cB s s
c|c|c
PO Download statistics - Host to SOM
Time;Receive Time;Processing Time;PO count
4.30 AM OMHPO File;Tue Feb 21 04:39:55 EST 2012;Tue Feb 21 05:38:58 EST 2012;17508
.TE
% ./s2
Environment: LC_ALL = C, LANG = C
(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 2.6.26-2-amd64, x86_64
Distribution : Debian GNU/Linux 5.0.8 (lenny)
bash GNU bash 3.2.39
tbl GNU tbl (groff) version 1.18.1
groff GNU groff version 1.18.1
-----
Input file data1:
.TS
tab(;) allbox;
c s s s
l l l l.
PO Download statistics - Host to SOM
Time;Receive Time;Processing Time;PO count
4.30 AM OMHPO File;Tue Feb 21 04:39:55 EST 2012;Tue Feb 21 05:38:58 EST 2012;17508
.TE
-----
Results:
grotty:data1:7: character above first line discarded
+--------------------------------------------------------------------------------------------+
| PO Download statistics - Host to SOM |
+-------------------+------------------------------+------------------------------+----------+
|Time | Receive Time | Processing Time | PO count |
+-------------------+------------------------------+------------------------------+----------+
|4.30 AM OMHPO File | Tue Feb 21 04:39:55 EST 2012 | Tue Feb 21 05:38:58 EST 2012 | 17508 |
+-------------------+------------------------------+------------------------------+----------+
The code in the earlier script was designed to process the first parameter as the file containing the tbl markup. This is more specific and uses ksh (which for this purpose is not critical):
% ./s3
Environment: LC_ALL = C, LANG = C
(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 2.6.26-2-amd64, x86_64
Distribution : Debian GNU/Linux 5.0.8 (lenny)
ksh 93s+
tbl GNU tbl (groff) version 1.18.1
groff GNU groff version 1.18.1
-----
Input file t1:
.TS
tab(;) allbox;
c s s s
l l l l.
PO Download statistics - Host to SOM
Time;Receive Time;Processing Time;PO count
4.30 AM OMHPO File;Tue Feb 21 04:39:55 EST 2012;Tue Feb 21 05:38:58 EST 2012;17508
.TE
-----
Results:
grotty:t1:7: character above first line discarded
+--------------------------------------------------------------------------------------------+
| PO Download statistics - Host to SOM |
+-------------------+------------------------------+------------------------------+----------+
|Time | Receive Time | Processing Time | PO count |
+-------------------+------------------------------+------------------------------+----------+
|4.30 AM OMHPO File | Tue Feb 21 04:39:55 EST 2012 | Tue Feb 21 05:38:58 EST 2012 | 17508 |
+-------------------+------------------------------+------------------------------+----------+