Re: column --table based on libsmartcols

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

 



On 19 April 2017 at 13:35, Sami Kerola <kerolasa@xxxxxx> wrote:
> On 19 April 2017 at 12:34, Karel Zak <kzak@xxxxxxxxxx> wrote:
>>  Overkill or useful? ;-)
>
> Looks very useful.
>
> The only Wish List item I can think of is --number-table-columns
> option that would print something like
>
> $ echo a b c | column -t  --number-table-columns-header-and-tail
> 1 2 3
> a b c
> 1 2 3
>
> In itself that is totally pointless rubbish line, but quite often I'm
> looking some tabular data and I know field number 'eh large' is the
> field I am interested - but afaik there is no tool that will tell me
> these numbers easily. Perhaps some awk END for i {1 ... NF} could do
> the same if adding this wish crosses a overkill line.

I played for a while with column[1] from your branch. Manual page
examples should include a version of the last example sent to mail
list.

$ column /proc/self/mountinfo \
  --table-columns=ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS
\
  --table-hide=SOURCE,MAJMIN,ROOT,PROP,SEP,TYPE,VFS-OPTS,FS-OPTS \
  --table-order=TARGET,ID,PARENT \
  --tree TARGET --tree-id ID --tree-parent PARENT

With that small improvement (and rebase on top of latest origin/master)
I would say this change set is ready to be merged.

-- 
Sami Kerola
http://www.iki.fi/kerolasa/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux