Hello,
I am developing a platform Independant tool that should work for all major unix flavors outlined in this forum(Solaris,Linux, AIX, HPUX, SCO,BSD)
Therefore, in order to cover all types of user community, I have deliberately posted the same message on every forum. Please do not think of this as spamming multiple forums. This is one of a kind request and I do not wish to continue with this approach(of spreading same post to multiple forums)
Now the question:
HTML Code:
The output on df -k on HP looks like below
/r01 (/dev/vgprj2app/vr01 ) : 207501014 total allocated Kb
33261948 free allocated Kb
174239066 used allocated Kb
83 % allocation used
/tmp (/dev/vg00/lvol4 ) : 11798652 total allocated Kb
11774476 free allocated Kb
24176 used allocated Kb
0 % allocation used
/usr (/dev/vg00/lvol7 ) : 4960928 total allocated Kb
2534000 free allocated Kb
2426928 used allocated Kb
On Solaris and others the same df -k will show the output in a very different format.
I am looking to massage above output to a comma delimited format to stream line the same format that will work as an input to Oracle databases.
HTML Code:
Mount,totalAllocated,FreeAllocated,usedAllocated,percent
"/r01",207501014,33261948,174239066,83
"/tmp",11798652,11774476,24176,0
"/usr",4960928,2534000,2426928,80
How can I massage the df -k ouput formats of various kinds into the one mentioned above using shell scripts? I heard that awk utility can do this, but I just dont know awk programming
Thanks,
D