Wojtek Pilorz wrote:

> ----------------------------------------------------------------
> try the following (on a machine with 128M or more of RAM):
> 
> time perl -e '$n=800000; $o=0;
> for ($i=1;$i<= $n; ++$i) {
>   $l=sprintf "%s line %8d, offset %10d\n", "="x16, $i, $o;
>   print $l;
>   $o += length $l; }
> ' | lless | wc
> 
> where 'lless' is 'less' with the above patch applied,
> and then same with standard less;


Why pipe to less and wc ?

less is a pager, for interactive use.
So you read the output, probably slower than less
processes it. If you want to speed it up, try
saving to a file (with tee) and then looking at it.


$ perl -e '...' | tee /tmp/junk | wc

and in another window:

$ less +F /tmp/junk

which tells less to look for more data in the file
like 'tail -f' does.

        -Thomas





_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to