hello awk gurus;
I have the following problem which I am having difficulties with.
I have a file that is produced on a hourly basis which I would like to friendly format so that it is easier to interpret. Currently, the contents of file is presented on four lines:
header: startdate and time and some other fields
physical-memory: data
virtual-memory: data
footer : enddate and time
Output is colon ) delimited.
example:
eport-high:header:20211223T010100Z:20211223T020100Z:10:7200
report-highhysical-memory:mem_default:[total]:97124608K:72.36%:-:-
report-high:virtual-memory:vm_default:[total]:102675472K:61.19%:-:-
report-high:footer:20211223T020100Z10:7200
Data is produced in groups of four rows with header and footer containing start and end time. I would like to display each group of four lines as a single line in a new file so it looks like below (comma delimited and transposed):
Startdate,time,Enddate,time,%physicalmemory,physicalmemory,%virtualmemory,virtualmemory;
20211223,T010100Z,20211223,T020100Z10,72.36%,97124608K,61.19%,102675472K;
How do i do this with awk or gawk in solaris ?
Any help appreciated.
Thanks in advance!
dean
I have the following problem which I am having difficulties with.
I have a file that is produced on a hourly basis which I would like to friendly format so that it is easier to interpret. Currently, the contents of file is presented on four lines:
header: startdate and time and some other fields
physical-memory: data
virtual-memory: data
footer : enddate and time
Output is colon ) delimited.
example:
eport-high:header:20211223T010100Z:20211223T020100Z:10:7200
report-highhysical-memory:mem_default:[total]:97124608K:72.36%:-:-
report-high:virtual-memory:vm_default:[total]:102675472K:61.19%:-:-
report-high:footer:20211223T020100Z10:7200
Data is produced in groups of four rows with header and footer containing start and end time. I would like to display each group of four lines as a single line in a new file so it looks like below (comma delimited and transposed):
Startdate,time,Enddate,time,%physicalmemory,physicalmemory,%virtualmemory,virtualmemory;
20211223,T010100Z,20211223,T020100Z10,72.36%,97124608K,61.19%,102675472K;
How do i do this with awk or gawk in solaris ?
Any help appreciated.
Thanks in advance!
dean