On 3/16/19 11:07 AM, Bruce Dubbs wrote: > It would be helpful to add a --terse option to df such that a user could > do something like: > > DF=$(df -k --terse --output=used $PWD) > > Right now I see no method of omitting the header or to collapse the > spaces between values to a single space. This can be done of course > with tools like awk, cut, sed, grep, tail, etc, but would be a lot > cleaner if done inside df.
The philosophy behind Unix tools is that each tool should do one thing well, and make it easy to string multiple tools together in pipelines to accomplish larger tasks. Bloating df to add to it something that you can already get with existing tools is counter to that philosophy; and even if we did extend df, you still would have to wait for that feature to become popular in the distro you use, vs. the ability you already have today to use existing tools. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature