![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parsing output | lochraven | Shell Programming and Scripting | 6 | 08-15-2008 04:38 PM |
| parsing output | looza | Shell Programming and Scripting | 6 | 07-15-2008 08:57 PM |
| parsing output from SQL querry | ludvig | Shell Programming and Scripting | 7 | 10-23-2007 05:42 AM |
| parsing output from a diff command... | kam | Shell Programming and Scripting | 5 | 05-29-2007 11:26 PM |
| parsing output from ls command | ajaya | Shell Programming and Scripting | 3 | 05-10-2006 10:22 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 Filesystem Size Used Avail Capacity Mounted on /vol1/joy 180G 137G 43G 76% /backup I am using the system command in the following way. Let me know if there is still an efficient way of doing it. Code:
printf("Free space: ");
system("df /vol1/joy | awk '{print $3}' | tail -n 1");
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|