> <var doesn't seem to work in dcmd arguments.  Say, in mdb -k:
> 
> 10>n
> ::walk proc | head -n <n
> 
> says
> 
> Usage: head -num|-n num
> mdb: try '::help head' for more information
> 
> Is that intentional?  Is there a workaround?

>From a syntax perspective, the right-hand side of a dcmd is a collection
of strings, unless the $[ ] syntax is used to evaluate an expression.
So what you actually want to say is:

10>n
::walk proc | ::head -n $[<n]

but if you do this, you will see a core dump because ::head's option
processing is completely busted.  If you like, you can go fix this
trivially and then you'll be able to do as above.

-Mike

-- 
Mike Shapiro, Solaris Kernel Development. blogs.sun.com/mws/

Reply via email to