parsing output of system()

Hi,

From the above output of df command I need to parse only 43G (available space) and display it.

root@localhost:> df -h /vol1/joy

[LEFT] Filesystem Size Used Avail Capacity Mounted on
/vol1/joy 180G 137G 43G 76% /backup
[/LEFT]

I am using the system command in the following way. Let me know if there is still an efficient way of doing it.

    printf("Free space: ");
     system("df  /vol1/joy | awk '{print $3}' | tail -n 1");

try..

-bash-3.2$ df -h /filesystem | awk 'END {print $3}'
13G
-bash-3.2$

To get the 'Free Space' prefix, use ...{ print "Free Space:",$3 }'

Thanks a bunch...Got what I needed..:b: