On Tuesday, July 12, 2011 00:24:15 Abhijit Halder wrote: please do not top post in your replies > How if we just put a condition check whether the entered string after > pipe (|) is numeric. For e.g. > (gdb) thread apply all bt | grep foobar > Here the entered string after | is grep foobar which is not numeric. > But here (gdb) print var | 0x50 is numeric. that wont work as it's "EXPR | EXPR". so you could do: (gdb) print x | x or if your variable was named "vim", it's impossible to determine the user's intention if they wrote something like: (gdb) print x | vim do they want the variable "vim" ? or do they want to shell out to `vim` ? i think we'll have to introduce a dedicated operator here that doesn't show up in C expressions. how about "|&" ? this is a bashism for doing redirection+pipe in one go, so it'll be somewhat familiar to people. along those lines, i wonder if generic redirection operators would be useful too. something like: (gdb) thread apply all bt >& file -mike