2003-12-18, 04:33 AM
Simple, yet I'm trying to figure out awk. Maybe someone can help me out here.
Code:
angry:/home/v702623# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 8.7G 940M 7.3G 12% /
now if I wanted to just display the /dev/hda3 8.7G 940M 7.3G 12% /
how would I go about doing that?
Code:
angry:/home/v702623# df -h | grep /dev/hda3
/dev/hda3 8.7G 940M 7.3G 12% /
However, what if I wanted to take it a step further? Something more like where it displays the output like this.
Filesystem: [/dev/hda3] Size: [8.7G] Used: [940M] Free: [7.3G] %Used: [12%]
I'd like to learn how to do that.