in reply to Re: disk space utilization
in thread disk space utilization
(the "-l" option helps make line-feed handling more like awk as well). I presume this still doesn't do exactly what the OP intended, since it prints a line of output for every line of input from "df -k"; but the OP's use of "grep '/^' " seems odd -- not sure what's intended by that.df -k | perl -lane 'print $F[3]'
To limit the output to a particular line, one can cite the target path as an arg to "df", and/or use a condition in the perl script:
df -k / | perl -lane 'print $F[3] if /\d/' # skips column headings # or just: df -k | perl -lane 'print $F[3] if m{/$}' # only prints value for "/ +"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: disk space utilization
by ministry (Scribe) on Apr 12, 2005 at 15:49 UTC | |
by graff (Chancellor) on Apr 14, 2005 at 03:34 UTC |