[Userland-team] [OpenIndiana Distribution - Bug #827] (Resolved) (GNU) df gives multiline output even when piped
illumos project
devnull at illumos.org
Sat Sep 10 20:42:19 UTC 2011
Issue #827 has been updated by Ken Mays.
Status changed from New to Resolved
file/gnu-coreutils at 8.5,5.11-0.151.1:20110910T035245Z
kmays ~ (alasdair2.uk): df --version
df (GNU coreutils) 8.5
...
kmays ~ (spiritworld): df -k |grep spirit
data/zones/spirited/ROOT/zbe-1
data/zones/spirited/ROOT/dc
data/zones/spirited/ROOT/projects
data/zones/spirited/ROOT/projects/build_trees
data/zones/spirited/ROOT/projects/build_trees/oi-oi_151a
data/zones/spirited/ROOT/projects/sustaining
data/zones/spirited/ROOT/projects/sustaining/oi_151a
data/zones/spirited/ROOT/repos
data/zones/spirited/ROOT/rpool
data/share/us/spiritworld/ga/homes
----------------------------------------
Bug #827: (GNU) df gives multiline output even when piped
https://www.illumos.org/issues/827
Author: Jim Klimov
Status: Resolved
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