bug-coreutils
[Top][All Lists]
Advanced

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

Re: cut - lack of --merge-delimiters option


From: James Youngman
Subject: Re: cut - lack of --merge-delimiters option
Date: Mon, 1 Sep 2008 02:07:21 +0100

On Sun, Aug 31, 2008 at 6:10 PM, Jan Skowron <address@hidden> wrote:
> coreutils program "cut" could use a "merge delimiters" option.
>
> Common use case: ls -l | cut ...
> One needs to print 7-th column of ls -l to see all times of
> modifications. But there is no constant number of delimiters between
> column, eg:
> drwxr-xr-x  23 user     group  4096 Mar 16  2006 user
> drwx------   2 root     root  16384 Dec 19  2003 lost+found
>
> merge delimiters option would help a lot in such cases. Without it
> users are forced to use "gawk" instead of "cut".

For this use case you should be using "stat --printf" or "find
-printf".  Parsing the dates produced by ls is problematic anyway:

~$ ( LC_ALL=C ls -ld ~/source/rekall ~/source/SimCity )
drwxr-xr-x  3 james users 4096 Sep  1 02:09 /home/james/source/SimCity
drwxr-xr-x 24 james users 4096 Mar 22  2004 /home/james/source/rekall

James.




reply via email to

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