On 8/24/07, zhijun <Zhijun.Fu at sun.com> wrote:
>
>
> Eric Schrock wrote:
>
> You have a couple different things in play here.
>
> First, MDB pipelines only work with uintptr_t's, not arbitrary text.  So
> when you try to pipe something like "foo: X" or "X Y Z" to another dcmd,
> the parser will choke.
>
> Normally, the formatting commands ('/' and friends) recognize when you
> are in pipe context and omit any extraneous formatting characters.
> Since they only output numbers, they are safe to use in pipe context.
>
> However, under ::eval, any notion of pipe context is (intentionally)
> ignored.  So ::eval '/Kn' will print the extra formatting characters
> (such as "swap_vnodes:") as it has no way of knowing it's being used in
> pipe context outside the eval context.  One way to get around this is to
> do something like:
>
>       ::array ... p | ::eval '<p/Kn | =Kn' | ::grep .==0
>
>
Why are you guys using ::eval for this, anyway?  Isn't this what ::map was
designed for?

(i.e. ::map '*.', or ::map '*<p' or something?)

Cheers,
- jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/mdb-discuss/attachments/20070825/b4bec51f/attachment.html>

Reply via email to