Structured (XML-like) input/output for shell apps?

2005-06-11 Thread Olaf van der Spek
Hi, Many shell apps/scripts output data in tables, for example ls -l, ps aux, top, netstat, etc. At the moment, most of these apps use fixed-width columns with a variable-width last-column. This results in (unnecessary) truncation, for example: Debian- 11918 0.0 0.1 4428 1464 ?Ss

Re: Structured (XML-like) input/output for shell apps?

2005-06-13 Thread GOMBAS Gabor
Hi, On Sat, Jun 11, 2005 at 07:40:10PM +0200, Olaf van der Spek wrote: > Many shell apps/scripts output data in tables, for example ls -l, ps > aux, top, netstat, etc. > At the moment, most of these apps use fixed-width columns with a > variable-width last-column. > This results in (unnecessary

Re: Structured (XML-like) input/output for shell apps?

2005-06-13 Thread Olaf van der Spek
On 6/13/05, GOMBAS Gabor <[EMAIL PROTECTED]> wrote: > > Are there already any plans to solve these issues? > > Yes. The commands you mention were designed for _human_ consumption. Do > not use them in scripts without good reasons. There are a lot of The maintainer of netstat didn't want to change

Re: Structured (XML-like) input/output for shell apps?

2005-06-13 Thread Humberto Massa Guimarães
* Gabor :: > Hi, > > On Sat, Jun 11, 2005 at 07:40:10PM +0200, Olaf van der Spek wrote: > > > Many shell apps/scripts output data in tables, for example ls > > -l, ps aux, top, netstat, etc. At the moment, most of these > > apps use fixed-width columns with a variable-width last-column. > > This

Re: Structured (XML-like) input/output for shell apps?

2005-06-13 Thread Olaf van der Spek
On 6/13/05, Humberto Massa Guimarães <[EMAIL PROTECTED]> wrote: > What Olaf *really* seems to want is a resource like the new (vapor?) > Monad shell from MS. Which can be a good thing, if done right, but > is generally a waste of CPU and memory, if you ask me. As you said, > there is not a lot of d

Re: Structured (XML-like) input/output for shell apps?

2005-06-13 Thread Humberto Massa Guimarães
* Olaf :: > On 6/13/05, Humberto Massa Guimarães <[EMAIL PROTECTED]> > wrote: > > printf "%-50.50s %d\n", $_, -s $_ for <*.ab> > > > > in Perl. The domain is necessary anyway, ie, you have to know > > Monad to understand the first, you have to know perl to grok the > > second. > > Except that in

Re: Structured (XML-like) input/output for shell apps?

2005-06-13 Thread Olaf van der Spek
On 6/13/05, Humberto Massa Guimarães <[EMAIL PROTECTED]> wrote: > Not necessarily. Just as you have "tableout" as an external command > (built-in or not) in Monad, you can have a Perl module to print > things in a tabular manner, expanding the column sizes as needed > (based on HTML::Format::Table

Re: Structured (XML-like) input/output for shell apps?

2005-06-13 Thread Olaf van der Spek
On 6/13/05, Humberto Massa Guimarães <[EMAIL PROTECTED]> wrote: > Yes, and I withdraw :-) what I said about XML. But *any* > serialization / deserialization necessary for this scheme to work > would add (unnecessary) overhead. This and the fact that you would Well, if you can do it with Perl witho

Re: Structured (XML-like) input/output for shell apps?

2005-06-13 Thread Humberto Massa Guimarães
* Olaf :: > On 6/13/05, Humberto Massa Guimarães <[EMAIL PROTECTED]> > wrote: > > Yes, and I withdraw :-) what I said about XML. But *any* > > serialization / deserialization necessary for this scheme to > > work would add (unnecessary) overhead. This and the fact that > > you would > > Well, if y

Re: Structured (XML-like) input/output for shell apps?

2005-06-13 Thread Humberto Massa Guimarães
> On 6/13/05, Humberto Massa Guimarães <[EMAIL PROTECTED]> > wrote: > > Not necessarily. Just as you have "tableout" as an external > > command (built-in or not) in Monad, you can have a Perl module > > to print things in a tabular manner, expanding the column sizes > > as needed (based on HTML::Fo

Re: Structured (XML-like) input/output for shell apps?

2005-06-13 Thread Olaf van der Spek
On 6/13/05, Humberto Massa Guimarães <[EMAIL PROTECTED]> wrote: > > Well, if you can do it with Perl without overhead, you can of > > course also do it without Perl without overhead. In that case the > > 'structured' support would be included > > Not exactly. Don't get me wrong, object component

Re: Structured (XML-like) input/output for shell apps?

2005-06-13 Thread Olaf van der Spek
On 6/13/05, Humberto Massa Guimarães <[EMAIL PROTECTED]> wrote: > There are a lot of scripts today in production use that use the > output of ls, ps, in a text-way. If you want to put another command, > or another switch to "ls", ok, but the fact that you *can* do it > does not mean that you *shoul