[Userland-team] [OpenIndiana Distribution - Bug #827] (GNU) df gives multiline output even when piped
illumos project
devnull at illumos.org
Sat Sep 10 12:38:39 UTC 2011
Issue #827 has been updated by Ken Mays.
Due date set to 2011-09-14
Assignee changed from OI SFW to OI Userland
Target version set to oi_151_stable
Estimated time set to 8.00
Difficulty set to Medium
Tags set to needs-triage
----------------------------------------
Bug #827: (GNU) df gives multiline output even when piped
https://www.illumos.org/issues/827
Author: Jim Klimov
Status: New
Priority: Normal
Assignee: OI Userland
Category: SFW (Solaris Freeware)
Target version: oi_151_stable
Difficulty: Medium
Tags: needs-triage
When 'df' program encounters "long" device or mountpoint names, it makes the terminal output prettier by splitting such lines into two and space-padding the output.
However, and many scripts historically depended on it, 'df' produces a single line per filesystem when piped (to grep, awk or whatever). This works with both Solaris and Linux (GNU?) df variants.
However, the /usr/gnu/bin/df in OI_148a LiveUSB lacks this feature:
root at openindiana:~# df -k /a
Filesystem 1K-blocks Used Available Use% Mounted on
rpool/ROOT/openindiana
16717979 2968243 13749736 18% /a
root at openindiana:~# df -k | grep openindiana
rpool/ROOT/openindiana
This is a bug and should be fixed - it can break an indeterminate number of scripts and programs which rely on parsing the 'df' output.
//Jim Klimov
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://www.illumos.org/my/account
More information about the Userland-team
mailing list