bug-coreutils
[Top][All Lists]
Advanced

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

Re: Output badformat of "df -h" & "df -T"


From: Pádraig Brady
Subject: Re: Output badformat of "df -h" & "df -T"
Date: Wed, 14 Jan 2009 09:52:48 +0000
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Bob Proulx wrote:
> Olaf Reitmaier Veracierta wrote:
>> I'm trying to use the output of the command df -T as input for some
>> shell script the problem arises when for some reason some line split
>> into two lines, ...
> 
> The lines are split when a field is too long to avoid misalignment.
> To avoid this use the -P / --portability format.  Here is the
> documentation from the df manual on it.
> 
>   `-P'
>   `--portability'
>        Use the POSIX output format.  This is like the default format
>        except for the following:
> 
>          1. The information about each file system is always printed on
>             exactly one line; a mount device is never put on a line by
>             itself.  This means that if the mount device name is more
>             than 20 characters long (e.g., for some network mounts), the
>             columns are misaligned.

This should not be controlled by -P I think.
At least this feature should only be enabled if isatty(1).
Otherwise scripts that don't use this non obvious option
will break as new devices are added to the system.

cheers,
Pádraig.




reply via email to

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