bug-coreutils
[Top][All Lists]
Advanced

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

bug#29604: man cut should mention no way to do ls -l|cut ...


From: Eric Blake
Subject: bug#29604: man cut should mention no way to do ls -l|cut ...
Date: Thu, 7 Dec 2017 09:46:44 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 12/07/2017 03:37 AM, 積丹尼 Dan Jacobson wrote:

> thus no way to process
> $ ls -l | cut ...
> and that one should use awk, etc. for that.

Let's step back a bit. We recommend that you NEVER parse ls output, as
it is inherently ambiguous and difficult to parse. MUCH better is to use
stat instead of ls, at which point you can get directly at the
information you want without having to post-process potentially
ambiguous output.  If anything, added documents should point people to
stat, not to bad ways of parsing ls.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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