shell script
Hi ,
I want to prepare one shell script which will display the available space,size,used of a filesystem (ex. /u01) along with the host name . i tried with the below command . but o/p is showing hostname 2 times.
$ df -hP /u01| awk -v d="$(hostname -s)" '{ print d " " $2 " " $3 " " $4 " " $6}'
xdhost1pp01 Size Used Avail Mounted
xdhost1pp01 99G 50G 44G /u01
$
o/p should be like this . can you help me here....
NODE NAME Size Used Avail Mounted
xdhost1pp01 99G 50G 44G /u01
Regards,
Ani
I want to prepare one shell script which will display the available space,size,used of a filesystem (ex. /u01) along with the host name . i tried with the below command . but o/p is showing hostname 2 times.
$ df -hP /u01| awk -v d="$(hostname -s)" '{ print d " " $2 " " $3 " " $4 " " $6}'
xdhost1pp01 Size Used Avail Mounted
xdhost1pp01 99G 50G 44G /u01
$
o/p should be like this . can you help me here....
NODE NAME Size Used Avail Mounted
xdhost1pp01 99G 50G 44G /u01
Regards,
Ani
0