bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6511: df output difficult to parse


From: Bob Proulx
Subject: bug#6511: df output difficult to parse
Date: Fri, 25 Jun 2010 15:09:56 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

Valerio Pachera wrote:
> I'm trying to parse di output of df command to check how much free
> space is left on my disks.  I need to check this by a script.  The
> problem is that, when the device name is long, we get a new line in
> the output (see example below).  It's difficult then have data
> relate with the device name or mount poiunt usign grep and awk.

Thank you for the report.  That is a nuisance!

> Proposed Solution:
> simply add an option to not wrap the output text.

Your request has been considered, found useful and a new option has
been added to df to enable this format.  Please use the -P option.
That will put all of the output on one line.

  $ df -Ph /dev/mapper/VolGroup00-dati  | awk '{print $4}'

       -P, --portability
              use the POSIX output format

Please find this option already installed on your system.  I am so
glad that we could so quickly add this option for you! :-)

Bob





reply via email to

[Prev in Thread] Current Thread [Next in Thread]