On Sat, Aug 25, 2007 at 10:45:10AM +0800, zhijun wrote: > > I really appreciate your kindness to explain this for me. > > ::array ... p | ::eval '<p/Kn | =Kn' gives pure uintptr_t's so it works > well with mdb pipeline. What I am suprized is that ::array ... p | /Kn > *doesn't* give pure uintptr_t's, as its output has an address in the first > line, so I expect it will break the mdb pipeline, but instead it works. Am > I missing anything here? >
As mentioned in the original mail, dcmds have a way of 'knowing' when they are in pipe context (DCMD_PIPE_OUT) and can alter their output based on this. For the '/' operator, you can find this check in print_arglist(): if (DCMD_HDRSPEC(flags) && (flags & DCMD_PIPE_OUT) == 0) { Are you just curious, or are you trying to solve a particular problem? As Jonathan mentioned, there are more efficient ways to accomplish what you have demonstrated thus far. - Eric -- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock