Util-Linux package development
 help / color / mirror / Atom feed
From: Bernhard Voelker <mail@bernhard-voelker.de>
To: Thomas Voss <mail@thomasvoss.com>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: Proposal for new column(1) flag
Date: Mon, 17 Oct 2022 20:08:03 +0200	[thread overview]
Message-ID: <20817a7e-9659-a00f-c141-2db0469a4594@bernhard-voelker.de> (raw)
In-Reply-To: <CNO4L8IMOGYS.1DZ36WVMXZ8K4@mango-os>

oh, your 2 emails indeed didn't come thru ... I guess because there were 3 attachments.

Hereby forwarding...

On 10/17/22 12:27, Thomas Voss wrote:
> NOTE: Sorry if this email is a duplicate, I have been trying to send this
> for a good while but theres something wrong with my email client
> configuration that I need to try to figure out.
> 
> Also in my first email I made some references to "center", I actually
> meant to say "column", center is just a tool I was writing some code for
> when sending that email so it was stuck in my head.
> 
> ---
> 
> On Thu Oct 13, 2022 at 10:43 PM CEST, Bernhard Voelker wrote:
>> Hmm, you missed to give actual examples.  Is it like the output of
>> this?
>>
>>     $ ls * | column -xc $COLUMNS | column -t
> 
> Not quite, let me give you a real-world example (and the thing that
> prompted me to think of adding this feature).
> 
> I have a simple script on my system that has a list of movies, and I want
> to be able to display them all nicely in columns.  At the moment I am
> doing this, which is not optimal because the gaps between columns are too
> large, it results in 5 columns and 8 rows:
> 
>     $ column -x movie-list
> 
> This is what your suggestion looks like, and it also resuts in 5 columns
> and 8 rows but much more squished together:
> 
>     $ column -xc $COLUMNS movie-list | column -t
> 
> And finally this is a really stupid solution which creates a file for
> each line of the file and then uses ls to print them, it results in 6
> columns and 6 rows, which is more space-efficient, and what I would like
> to be able to get as output:
> 
>     #!/bin/sh
> 
>     while read f; do
>             touch $f
>     done <../movie-list
>     ls *
>     rm *
> 
> The outputs are included in files attached to this email

Have a nice day,
Berny


  parent reply	other threads:[~2022-10-17 18:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 19:26 Proposal for new column(1) flag Thomas Voss
2022-10-13 20:43 ` Bernhard Voelker
     [not found]   ` <CNO4L8IMOGYS.1DZ36WVMXZ8K4@mango-os>
2022-10-17 18:08     ` Bernhard Voelker [this message]
2022-10-17  8:42 ` Karel Zak
2022-10-17 10:10   ` Thomas Voss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20817a7e-9659-a00f-c141-2db0469a4594@bernhard-voelker.de \
    --to=mail@bernhard-voelker.de \
    --cc=mail@thomasvoss.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox