Hello,
I have a script that outputs data i need for reporting:
#!/bin/csh
date >> /var/tmp/nat_table_output.out
/opt/CPfw1-R55p/bin/fw tab -t fwx_alloc -s >> /var/tmp/nat_table_output.out
As per above i get the following output:
Fri Jul 6 22:00:00 EDT 2007
HOST NAME ID #VALS #PEAK #SLINKS
localhost fwx_alloc 8187 17666 30421 0
The first row is date ofcourse, row 2 and 3 are automatically formatted that way by the fw tab command i run for my firewall. Im trying to get the date/time stamp as part of the localhost entry instead of its own row at the top of each entry.. Not sure how this can be done, i have very new to this, but i'd like my outputed data to look like:
DATE HOST NAME ID #VALS #PEAK #SLINKS
Fri Jul 6 21:30:00 EDT 2007 localhost fwx_alloc 8187 17124 30421 0
DATE HOST NAME ID #VALS #PEAK #SLINKS
Fri Jul 6 21:45:01 EDT 2007 localhost fwx_alloc 8187 18880 30421 0
DATE HOST NAME ID #VALS #PEAK #SLINKS
Fri Jul 6 22:00:00 EDT 2007 localhost fwx_alloc 8187 17666 30421 0
SO basically, need to add the DATE title and column, and the date/time stamp under it appended to the table
Hope this makes sense, any help is appreciated.
Thanks,
dR
I have a script that outputs data i need for reporting:
#!/bin/csh
date >> /var/tmp/nat_table_output.out
/opt/CPfw1-R55p/bin/fw tab -t fwx_alloc -s >> /var/tmp/nat_table_output.out
As per above i get the following output:
Fri Jul 6 22:00:00 EDT 2007
HOST NAME ID #VALS #PEAK #SLINKS
localhost fwx_alloc 8187 17666 30421 0
The first row is date ofcourse, row 2 and 3 are automatically formatted that way by the fw tab command i run for my firewall. Im trying to get the date/time stamp as part of the localhost entry instead of its own row at the top of each entry.. Not sure how this can be done, i have very new to this, but i'd like my outputed data to look like:
DATE HOST NAME ID #VALS #PEAK #SLINKS
Fri Jul 6 21:30:00 EDT 2007 localhost fwx_alloc 8187 17124 30421 0
DATE HOST NAME ID #VALS #PEAK #SLINKS
Fri Jul 6 21:45:01 EDT 2007 localhost fwx_alloc 8187 18880 30421 0
DATE HOST NAME ID #VALS #PEAK #SLINKS
Fri Jul 6 22:00:00 EDT 2007 localhost fwx_alloc 8187 17666 30421 0
SO basically, need to add the DATE title and column, and the date/time stamp under it appended to the table
Hope this makes sense, any help is appreciated.
Thanks,
dR