<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Multiple commands in one line in Cisco Software Discussions</title>
    <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717255#M5488</link>
    <description>&lt;P&gt;I am trying to create an output file and save it to flash. Here is what I want:&lt;/P&gt;&lt;P&gt;show log | i DECTK&lt;/P&gt;&lt;P&gt;But I want to redirect the results to a text file in flash. I realize I can use the redirect command, but I can only do that with the entire log. I only want specific log that I created using EEM. I also can't use the include and redirect command at the same time. Is there a way I can accomplish this?&lt;/P&gt;</description>
    <pubDate>Mon, 07 Nov 2022 16:31:59 GMT</pubDate>
    <dc:creator>kaellsworth74</dc:creator>
    <dc:date>2022-11-07T16:31:59Z</dc:date>
    <item>
      <title>Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717255#M5488</link>
      <description>&lt;P&gt;I am trying to create an output file and save it to flash. Here is what I want:&lt;/P&gt;&lt;P&gt;show log | i DECTK&lt;/P&gt;&lt;P&gt;But I want to redirect the results to a text file in flash. I realize I can use the redirect command, but I can only do that with the entire log. I only want specific log that I created using EEM. I also can't use the include and redirect command at the same time. Is there a way I can accomplish this?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 16:31:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717255#M5488</guid>
      <dc:creator>kaellsworth74</dc:creator>
      <dc:date>2022-11-07T16:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717277#M5490</link>
      <description>&lt;P&gt;just test as below :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;event manager applet logtest authorization bypass&lt;BR /&gt;event none&lt;BR /&gt;action 1.0 cli command "enable"&lt;BR /&gt;action 1.1 set&amp;nbsp; logcmd01 "show logging | in BULK"&lt;BR /&gt;action 1.2 cli command "$logcmd01"&lt;BR /&gt;action 1.3 file open lf flash:error.txt w&lt;BR /&gt;action 1.4 file write lf "$_cli_result"&lt;BR /&gt;action 1.5 file close lf&lt;BR /&gt;!&lt;/P&gt;
&lt;P&gt;#event manager run logtest&lt;/P&gt;
&lt;P&gt;1#more flash:error.txt&lt;BR /&gt;Jun 21 12:29:49.054: %EWLC_HA_LIB_MESSAGE-6-BULK_SYNC_STATE_INFO: Switch 2 R0/0: wncmgrd: INFO: Bulk sync status : COLD/n slot memory init failed for 1&lt;BR /&gt;Jun 21 12:32:37.785: %EWLC_HA_LIB_MESSAGE-6-BULK_SYNC_STATE_INFO: Switch 1 R0/0: wncmgrd: INFO: Bulk sync status : HOT&lt;BR /&gt;Jun 21 12:32:37.591: %EWLC_HA_LIB_MESSAGE-6-BULK_SYNC_STATE_INFO: Switch 2 R0/0: wncmgrd: INFO: Bulk sync status : HOT&lt;BR /&gt;Jun 21 12:32:45.428: %HA_CONFIG_SYNC-6-BULK_CFGSYNC_SUCCEED: Bulk Sync succeeded&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 17:08:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717277#M5490</guid>
      <dc:creator>balaji.bandi</dc:creator>
      <dc:date>2022-11-07T17:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717315#M5492</link>
      <description>I am having issues with the line "action 1.4 file write lf "$_cli_result"". My IOS isn't liking that variable.&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Nov 2022 18:17:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717315#M5492</guid>
      <dc:creator>kaellsworth74</dc:creator>
      <dc:date>2022-11-07T18:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717318#M5493</link>
      <description>&lt;P&gt;can you share EEM you used?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 18:23:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717318#M5493</guid>
      <dc:creator>MHM Cisco World</dc:creator>
      <dc:date>2022-11-07T18:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717328#M5495</link>
      <description>event manager applet report authorization bypass&lt;BR /&gt;event none&lt;BR /&gt;action 1.0 cli command "enable"&lt;BR /&gt;action 1.1 set logcmd01 "show logging | in DECTK"&lt;BR /&gt;action 1.2 cli command "$logcmd01"&lt;BR /&gt;action 1.3 file open lf flash:report.txt w&lt;BR /&gt;action 1.4 file write lf "$_cli_result"&lt;BR /&gt;action 1.5 file close lf&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Nov 2022 18:38:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717328#M5495</guid>
      <dc:creator>kaellsworth74</dc:creator>
      <dc:date>2022-11-07T18:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717333#M5498</link>
      <description>&lt;P&gt;At the action "1.4 file write lf "$_cli_result"" line, I get an "Incomplete command" when I hit enter. I've tried working with that line but can't get anything to work.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 18:44:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717333#M5498</guid>
      <dc:creator>kaellsworth74</dc:creator>
      <dc:date>2022-11-07T18:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717377#M5501</link>
      <description>&lt;P&gt;can you post show version from your device and model.&lt;/P&gt;
&lt;P&gt;instead of pasting, type the syntax with? what option you get ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 20:51:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717377#M5501</guid>
      <dc:creator>balaji.bandi</dc:creator>
      <dc:date>2022-11-07T20:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717383#M5504</link>
      <description>&lt;P&gt;It's a Cisco 3925 router with version 15.7(3)M8.&lt;/P&gt;&lt;P&gt;After I type "action 1.4 file write lf" and hit the ? I have 1 option which is "WORD&amp;nbsp; &amp;nbsp;string data to write test".&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 21:05:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717383#M5504</guid>
      <dc:creator>kaellsworth74</dc:creator>
      <dc:date>2022-11-07T21:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717396#M5505</link>
      <description>&lt;P&gt;i just tested on 15.2 IOS code as below :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WAN-DMZ(config-applet)#action 1.4 file write lf ?&lt;BR /&gt;WORD string data to write test&lt;/P&gt;
&lt;P&gt;WAN-DMZ(config-applet)#action 1.4 file write lf "$_cli_result" ?&lt;BR /&gt;WORD 1 to 4294967295, or $variable&lt;BR /&gt;&amp;lt;cr&amp;gt;&lt;/P&gt;
&lt;P&gt;WAN-DMZ(config-applet)#action 1.4 file write lf "$_cli_result"&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 21:21:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717396#M5505</guid>
      <dc:creator>balaji.bandi</dc:creator>
      <dc:date>2022-11-07T21:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717976#M5515</link>
      <description>&lt;P&gt;My result:&lt;/P&gt;&lt;P&gt;HOSTNAME(config-applet)# action 1.4 file write lf $_cli_result&lt;/P&gt;&lt;P&gt;% Incomplete command&lt;/P&gt;&lt;P&gt;HOSTNAME(config-applet)# action 1.4 file write lf $_cli_result ?&lt;/P&gt;&lt;P&gt;WORD 1 to 4294967295, or $variable&lt;/P&gt;&lt;P&gt;It won't accept that line unless I put something after $_cli_result, but anything I put after it is what gets written to the report.txt file. After I do a show run, this is what the configs look like:&lt;/P&gt;&lt;P&gt;event manager applet report authorization bypass&lt;/P&gt;&lt;P&gt;&amp;nbsp; event none&lt;/P&gt;&lt;P&gt;&amp;nbsp; action 1.0 cli command "enable"&lt;/P&gt;&lt;P&gt;&amp;nbsp; action 1.1 set logcmd01 "show log | in DECTK"&lt;/P&gt;&lt;P&gt;&amp;nbsp; action 1.2 cli command ""&lt;/P&gt;&lt;P&gt;&amp;nbsp; action 1.3 file open lf report.txt w&lt;/P&gt;&lt;P&gt;&amp;nbsp; action 1.4 file write lf "TEST"&lt;/P&gt;&lt;P&gt;&amp;nbsp; action 1.5 file close lf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It doesn't seem to be creating the $logcmd01 variable. Isn't there a command to enable the use of Linux commands in the IOS? Maybe I need to do that first.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 14:49:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4717976#M5515</guid>
      <dc:creator>kaellsworth74</dc:creator>
      <dc:date>2022-11-08T14:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718027#M5516</link>
      <description>It was the "shell processing full" command, but that didn't work. Is there any other way to accomplish what I am trying to do, because this way doesn't seem to be working for me.&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Nov 2022 16:18:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718027#M5516</guid>
      <dc:creator>kaellsworth74</dc:creator>
      <dc:date>2022-11-08T16:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718143#M5518</link>
      <description>&lt;P&gt;&lt;SPAN&gt;HOSTNAME(config-applet)# action 1.4 file write lf &lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;$_cli_result&lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;&amp;nbsp; &amp;nbsp;&amp;lt;-- i seee the Quotes missing here&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;i would suggest to paster each line to see any errors.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 18:36:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718143#M5518</guid>
      <dc:creator>balaji.bandi</dc:creator>
      <dc:date>2022-11-08T18:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718156#M5519</link>
      <description>I tried it with the quotes.&lt;BR /&gt;&lt;BR /&gt;Results without quotes:&lt;BR /&gt;HOSTNAME(config-applet)# action 1.4 file write lf $_cli_result&lt;BR /&gt;% Incomplete command&lt;BR /&gt;&lt;BR /&gt;Results with quotes:&lt;BR /&gt;HOSTNAME(config-applet)# action 1.4 file write lf "$_cli_result"&lt;BR /&gt;^&lt;BR /&gt;% Invalid input detected at '^' marker.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Nov 2022 19:00:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718156#M5519</guid>
      <dc:creator>kaellsworth74</dc:creator>
      <dc:date>2022-11-08T19:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718179#M5520</link>
      <description>&lt;P&gt;Here are all the ways I have tried:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;HOSTNAME(config)# event manager applet report authorization bypass&lt;BR /&gt;HOSTNAME(config-applet)# event none&lt;BR /&gt;HOSTNAME(config-applet)# action 1.0 cli command "enable"&lt;BR /&gt;HOSTNAME(config-applet)# action 1.1 set logcmd01 "show log | in DECTK"&lt;BR /&gt;HOSTNAME(config-applet)# action 1.2 cli command "$logcmd01"&lt;BR /&gt;HOSTNAME(config-applet)# action 1.3 file open fh report.txt w&lt;BR /&gt;HOSTNAME(config-applet)# action 1.4 file write fh $_cli_result&lt;BR /&gt;% Incomplete command&lt;BR /&gt;&lt;BR /&gt;HOSTNAME(config-applet)# action 1.4 file write fh $_cli_result ?&lt;BR /&gt;  WORD  1 to 4294967295, or $variable&lt;BR /&gt;  &amp;lt;cr&amp;gt;  &amp;lt;cr&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HOSTNAME(config)# event manager applet report authorization bypass&lt;BR /&gt;HOSTNAME(config-applet)# event none&lt;BR /&gt;HOSTNAME(config-applet)# action 1.0 cli command "enable"&lt;BR /&gt;HOSTNAME(config-applet)# action 1.1 set logcmd01 "show log | in DECTK"&lt;BR /&gt;HOSTNAME(config-applet)# action 1.2 cli command "$logcmd01"&lt;BR /&gt;HOSTNAME(config-applet)# action 1.3 file open fh report.txt w&lt;BR /&gt;HOSTNAME(config-applet)# action 1.4 file write fh "$_cli_result"&lt;BR /&gt;                                                   ^&lt;BR /&gt;% Invalid input detected at '^' marker.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 19:28:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718179#M5520</guid>
      <dc:creator>kaellsworth74</dc:creator>
      <dc:date>2022-11-08T19:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718196#M5521</link>
      <description>&lt;P&gt;I have virtual router with&amp;nbsp;Version 15.7(3)M3 - it works as expected.&lt;/P&gt;
&lt;P&gt;can you post&amp;nbsp; :&lt;/P&gt;
&lt;P&gt;#show event manager ver&lt;/P&gt;
&lt;P&gt;Let me think any other ways like TCP script can help you.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 19:57:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718196#M5521</guid>
      <dc:creator>balaji.bandi</dc:creator>
      <dc:date>2022-11-08T19:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718640#M5526</link>
      <description>&lt;PRE&gt;HOSTNAME#show event manager version&lt;BR /&gt;Embedded Event Manager Version 4.00&lt;BR /&gt;Component Version:&lt;BR /&gt;eem: (rel9)1.3.0&lt;BR /&gt;eem-gold: (rel1)1.0.2&lt;BR /&gt;eem-call-home: (rel2)1.0.5&lt;BR /&gt;Event Detectors:&lt;BR /&gt;Name               Version      Node      Type&lt;BR /&gt;application         01.00      node0/0     RP&lt;BR /&gt;rf                  01.00      node0/0     RP&lt;BR /&gt;identity            01.00      node0/0     RP&lt;BR /&gt;neighbor-discovery  01.00      node0/0     RP&lt;BR /&gt;routing             02.00      node0/0     RP&lt;BR /&gt;syslog              01.00      node0/0     RP&lt;BR /&gt;generic             01.00      node0/0     RP&lt;BR /&gt;nhrp                01.00      node0/0     RP&lt;BR /&gt;track               01.00      node0/0     RP&lt;BR /&gt;resource            01.00      node0/0     RP&lt;BR /&gt;cli                 01.00      node0/0     RP&lt;BR /&gt;counter             01.00      node0/0     RP&lt;BR /&gt;interface           01.00      node0/0     RP&lt;BR /&gt;ioswdsysmon         01.00      node0/0     RP&lt;BR /&gt;none                01.00      node0/0     RP&lt;BR /&gt;oir                 01.00      node0/0     RP&lt;BR /&gt;snmp                01.00      node0/0     RP&lt;BR /&gt;snmp-object         01.00      node0/0     RP&lt;BR /&gt;snmp-notification   01.00      node0/0     RP&lt;BR /&gt;timer               01.00      node0/0     RP&lt;BR /&gt;test                01.00      node0/0     RP&lt;BR /&gt;config              01.00      node0/0     RP&lt;BR /&gt;env                 01.00      node0/0     RP&lt;BR /&gt;ds                  01.00      node0/0     RP&lt;BR /&gt;crash               01.00      node0/0     RP&lt;BR /&gt;nf                  01.00      node0/0     RP&lt;BR /&gt;rpc                 01.00      node0/0     RP&lt;BR /&gt;ipsla               01.00      node0/0     RP&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Nov 2022 13:32:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4718640#M5526</guid>
      <dc:creator>kaellsworth74</dc:creator>
      <dc:date>2022-11-09T13:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple commands in one line</title>
      <link>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4731551#M5646</link>
      <description>&lt;P&gt;I figured out my issue. In order to use the variable correctly, I needed to put either single quotes around the variable, or a back slash in front of it.&lt;/P&gt;&lt;PRE&gt;event manager applet 999_A trap authorization bypass&lt;BR /&gt; event track 999 state up&lt;BR /&gt; action 1.0 cli command "enable"&lt;BR /&gt; action 1.1 syslog priority warnings msg ",DECTK Kit,DG4_ECK_03,is online."&lt;BR /&gt; action 1.2 file open fh flash:report.txt a+&lt;BR /&gt; action 1.3 file write fh "\$_event_pub_time,DECTK Kit,DG4_ECK_03,is online."&lt;BR /&gt; action 1.4 file close fh&lt;BR /&gt;&lt;BR /&gt;event manager applet 999_B trap authorization bypass&lt;BR /&gt; event track 999 state down&lt;BR /&gt; action 1.0 cli command "enable"&lt;BR /&gt; action 1.1 syslog priority warnings msg ",DECTK Kit,DG4_ECK_03,is offline."&lt;BR /&gt; action 1.2 file open fh flash:report.txt a+&lt;BR /&gt; action 1.3 file write fh "\$_event_pub_time,DECTK Kit,DG4_ECK_03,is offline."&lt;BR /&gt; action 1.4 file close fh&lt;/PRE&gt;&lt;P&gt;My final script. It works just as I want it to. Thanks for your guidance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 15:10:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/cisco-software-discussions/multiple-commands-in-one-line/m-p/4731551#M5646</guid>
      <dc:creator>kaellsworth74</dc:creator>
      <dc:date>2022-12-02T15:10:50Z</dc:date>
    </item>
  </channel>
</rss>

