Cisco Support Community

Multiple Pipe Support

Posted By:


Posted Date:

Aug 17, 2010


User Interface




Cisco-Style BSD


This script implements multiple pipe support from the IOS command line.

Script Modified Date:

Aug 17, 2010

Cisco IOS Version tested:

15.0(1)M 12.2(53)SE

Cisco Products Tested:

2821 3560

Environment Variables used:

Rating Count:


Average Rating:


File Size:

2.7 KB

Script Info URL:

How many times have you wanted to do "show run | inc snmp | redirect  flash:/snmp.cfg"? Up until now this wasn't possible because IOS only  supports one pipe. The other pipes are treated as part of the argument  to the first pipe command. The cl_multi_pipe.tcl EEM policy enables the  support for multiple command pipelines. You can run as many pipe  commands as you want.

Community Member

hi..this is my problem...

I want to sent output command from switch to ftp server..Below are the step that i have done :

1- Copy script cl_multi_pipe.tcl to my switch (Cisco catalyst WS-C3560E-12SD , IOS : 12.2(55)SE)


Directory of flash:/

    2  -rwx        3096  Oct 28 2011 23:59:02 +08:00  multiple-fs

    3  -rwx        3857  Oct 28 2011 23:59:02 +08:00  private-config.text

    4  -rwx        5716  Oct 28 2011 23:59:01 +08:00  config.text

    5  -rwx        8916  Jul 25 2011 16:12:38 +08:00  vlan.dat

  443  -rwx        4524  Nov 18 2011 15:09:34 +08:00  cl_multi_pipe.tcl

    6  drwx         512  Nov 12 2010 15:31:05 +08:00  c3560e-universalk9-mz.122-55.SE

57931776 bytes total (39990272 bytes free)

2- Create event manager directory & policy

C3560G#sh ru | b event

event manager directory user policy "flash:/"

event manager policy cl_multi_pipe.tcl



3- At the same time i already configure kron & command to push text file to my ftp server

kron occurrence PipeOut at 15:00 sun recurring

policy-list PipeOut


kron policy-list PipeOut

cli show version | i uptime | redirect

4- Description for all above step.

- I start with configure step 3 to gather information about switch uptime

- Switch will kron text file every sunday at 15:00pm to ftp server

- This task cannot be done because kron cannot accept double pipe ( i guest ?)

- The idea is to use Cisco EEM features to do the double pipe command.

- My problem :: How to configure EEM so that the task will run automatically just like kron schedule ?

Please advice.


Community Member

Hi Joe,

I've used this script in the past on other equipment without an issue, but I'm having some difficulty now.  Any ideas of what the problem is?

881W-Router#dir flash: | i .tcl
    7  -rw-           0  Aug 24 2014 16:20:24 +00:00  cl_multi_pipe.tcl

881W-Router#show run | i event
event manager directory user policy "flash:/"

881W-Router(config)#event manager policy cl_multi_pipe.tcl
EEM Register event failed: Error unable to parse EEM policy for registration commands.

EEM configuration: failed to retrieve intermediate registration result for policy cl_multi_pipe.tcl

I'm interpreting this as having EEM version 4.00

881W-Router#show event manager version
Embedded Event Manager Version 4.00
Component Versions:
eem: (rel4)1.0.0
eem-gold: (rel1)1.0.2
eem-call-home: (rel2)1.0.0
Event Detectors:
Name                Version   Node        Type
application         01.00     node0/0     RP
identity            01.00     node0/0     RP
neighbor-discovery  01.00     node0/0     RP
routing             02.00     node0/0     RP
syslog              01.00     node0/0     RP
generic             01.00     node0/0     RP
nhrp                01.00     node0/0     RP
track               01.00     node0/0     RP
resource            01.00     node0/0     RP
cli                 01.00     node0/0     RP
counter             01.00     node0/0     RP
interface           01.00     node0/0     RP
ioswdsysmon         01.00     node0/0     RP
none                01.00     node0/0     RP
oir                 01.00     node0/0     RP
snmp                01.00     node0/0     RP
snmp-object         01.00     node0/0     RP
ipsla               01.00     node0/0     RP
snmp-notification   01.00     node0/0     RP
timer               01.00     node0/0     RP
test                01.00     node0/0     RP
config              01.00     node0/0     RP
env                 01.00     node0/0     RP
nf                  01.00     node0/0     RP
rpc                 01.00     node0/0     RP



Did you ever find a fix for this? I'm getting the same result.