[c-nsp] passing parameters in ios exec commands using variables

Tassos Chatzithomaoglou achatz at forthnet.gr
Sat Feb 24 18:31:07 EST 2007


I'm trying to find a way to pass a parameter to an ios command (on a 3640/12.4), but that parameter 
is not at the end of the command. So i need to define something like a variable.

Something like the following:

Router(config)#alias exec shpo sh policy-map int $1 | inc input|output|offer
Router(config)#^Z
Router#shpo e0/0
sh policy-map int $1 | inc input|output|offer e0/0
                   ^
% Invalid input detected at '^' marker.


Of course the above is not working (the parameter is passed at the end, as expected), but you get 
the idea of what i'm trying to do.

I even created a tcl script that produces the output i want, but i haven't found a way to run it 
without entering tclsh mode (which means privileged access).

Is there a solution or an alternative way (without using any external scripts) to my request or am i 
asking too much?

-- 
Tassos


More information about the cisco-nsp mailing list