This is the worst part about some of these queries, they are over vaugue.
This sounds like a script request. Beyond what you have said, it's still over vague now we know it's a request.
Can you give examples, who is to type it, anything else it should do?
Any joe can make that output, but with more information, your only gonna come back moaning "It's nothing like what I asked".
And you know what the answer would be "What you want is nothing like you asked!"
The title "Support and discussion of Tcl scripts and help with scripting." for the Tcl forum, gives no hint of Tcl script requests.