[colug-432] Nice Plain Text Columns and Avoiding NIH
Jeff Frontz
jeff.frontz at gmail.com
Mon Aug 8 09:27:47 EDT 2011
There is an existing (not sure what "pre-existing" would be--
something before it existed?) program that does just what you say and
it's got an infinite number of command-line options to allow parsing
whatever input and creating whatever format of output you want.
It's called "awk".
On Mon, Aug 8, 2011 at 8:47 AM, <jep200404 at columbus.rr.com> wrote:
> Let's start over.
>
> On Sun, 7 Aug 2011 22:16:18 -0400, Jeff Frontz <jeff.frontz at gmail.com> wrote:
>
>> Maybe I'm misunderstanding what it is that you want, ...
>
> You are not the only one to misunderstand what I want.
>
> First of all, I am _not_ asking how to make a program,
> or about techniques for making a program.
> For decades, I have known many ways to make such a program.
> I was trying to avoid writing such a program altogether.
> Instead I was wanting to know of an already existing program
> that someone else had written.
>
> Here's what I am looking for.
>
> A _pre-existing_ program that:
> o is a classic plain text filter
> o uses tabs to delimit input fields (columns)
> o echoes the input, replacing tabs with enough spaces so
> as to make the fields line up in nice columns
> o each column would only get as much space as it
> needs to line up nice
> (program would have to read all input to figure
> output width of each field, before outputting
> anything)
> o output columns would be separated with a single ' '
>
> or more fancily:
>
> A _pre-existing_ program that:
> o is a classic plain text filter
> o uses tabs to delimit input fields (columns)
> (option to specify arbitrary delimiter would be nice)
> o echoes the input, replacing tabs with spaces so
> as to make the fields line up in nice columns
> o each column would only get as much space as it
> needs to line up nice
> (program would have to read all input to figure
> output width of each field, before outputting
> anything)
> (would be nice to have option to limit width of
> particular output columns)
> (would be nice to have option to specify minimum
> width for particular output columns)
> o output columns would be separated with a single ' '
> (option to specify other separator would be nice)
>
> _______________________________________________
> colug-432 mailing list
> colug-432 at colug.net
> http://lists.colug.net/mailman/listinfo/colug-432
>
More information about the colug-432
mailing list