<?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 RE: On an X450a-48t is there a way to put more than one command on the command line ? e.g. in UNIX commands can be separated by a semi-colon in ExtremeSwitching (EXOS/Switch Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54288#M15457</link>
    <description>I can't test right now, but would inserting a \n between commands would work? Worth the try.&lt;BR /&gt;</description>
    <pubDate>Thu, 08 Jan 2015 22:32:00 GMT</pubDate>
    <dc:creator>Stephane_Grosj1</dc:creator>
    <dc:date>2015-01-08T22:32:00Z</dc:date>
    <item>
      <title>On an X450a-48t is there a way to put more than one command on the command line ? e.g. in UNIX commands can be separated by a semi-colon</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54284#M15453</link>
      <description>On an X450a-48t is there a way to put more than one command on the command line ? For example in UNIX commands can be separated by a semi-colon</description>
      <pubDate>Thu, 08 Jan 2015 21:58:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54284#M15453</guid>
      <dc:creator>John_Nicolson</dc:creator>
      <dc:date>2015-01-08T21:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: On an X450a-48t is there a way to put more than one command on the command line ? e.g. in UNIX commands can be separated by a semi-colon</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54285#M15454</link>
      <description>Hey John&lt;BR /&gt;
&lt;BR /&gt;
No you can't put more than one command in at a time but what I normally do is type the commands in notepad or something and then just copy and paste them into the CLI.  Doing that allows for you to enter any amount of commands at one time.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
P&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jan 2015 22:00:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54285#M15454</guid>
      <dc:creator>Paul_Russo</dc:creator>
      <dc:date>2015-01-08T22:00:00Z</dc:date>
    </item>
    <item>
      <title>RE: On an X450a-48t is there a way to put more than one command on the command line ? e.g. in UNIX commands can be separated by a semi-colon</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54286#M15455</link>
      <description>I would like to understand the question again.&lt;BR /&gt;
The reason I would want such a feature is to do things faster.&lt;BR /&gt;
&lt;BR /&gt;
EXOS has better options.&lt;BR /&gt;
It supports CLI scripting.&lt;BR /&gt;
&lt;BR /&gt;
enable cli-scripting &lt;BR /&gt;
Sample cli scripts&lt;BR /&gt;
&lt;BR /&gt;
The following script displays the date and time:set var CLI.OUT " "&lt;BR /&gt;
show switch&lt;BR /&gt;
set var date $TCL(lrange ${CLI.OUT} 27 29)&lt;BR /&gt;
set var year $TCL(lrange ${CLI.OUT} 31 31)&lt;BR /&gt;
set var date $TCL(linsert $date 3 $year)&lt;BR /&gt;
set var time $TCL(lrange ${CLI.OUT} 30 30)&lt;BR /&gt;
show var date&lt;BR /&gt;
show var time&lt;BR /&gt;
The following script sorts the FDB table in descending order:&lt;BR /&gt;
set var CLI.OUT " "&lt;BR /&gt;
show fdb&lt;BR /&gt;
set var x1 $TCL(split ${CLI.OUT} "\n")&lt;BR /&gt;
set var x2 $TCL(lsort -decreasing $x1)&lt;BR /&gt;
set var output $TCL(join $x2 "\n")&lt;BR /&gt;
show var output&lt;BR /&gt;
The following script extracts the MAC address given the age of an FDB entry:&lt;BR /&gt;
set var CLI.OUT " "&lt;BR /&gt;
show fdb&lt;BR /&gt;
set var input $TCL(split ${CLI.OUT} "\n")&lt;BR /&gt;
set var y1 $TCL(lsearch -glob $input *age*)&lt;BR /&gt;
set var y2 $TCL(lindex $input $y1)&lt;BR /&gt;
set var y3 $TCL(split $y2 " ")&lt;BR /&gt;
set var y4 $TCL(lindex $y3 0)&lt;BR /&gt;
show var y4&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jan 2015 22:21:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54286#M15455</guid>
      <dc:creator>PARTHIBAN_CHINN</dc:creator>
      <dc:date>2015-01-08T22:21:00Z</dc:date>
    </item>
    <item>
      <title>RE: On an X450a-48t is there a way to put more than one command on the command line ? e.g. in UNIX commands can be separated by a semi-colon</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54287#M15456</link>
      <description>I want to run an automated script from a UNIX platform that connects to an X450 (using UNIX Expect TCL),  enters the password, then runs command(s)  and exits the X450 once the prompt re-appears. It's fairly straightforward to get this to happen for a simple comand like 'show slot'. But a command like 'show ipstats' requires 'disable clipaging' or it will stop at the 'Press SPACE to continue' prompt. If I was doing this sort of thing to another UNIX server I would simply send "disable clipaging ; show ipstats" or indeed any set of commands serperated by a semi-colon.&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jan 2015 22:32:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54287#M15456</guid>
      <dc:creator>John_Nicolson</dc:creator>
      <dc:date>2015-01-08T22:32:00Z</dc:date>
    </item>
    <item>
      <title>RE: On an X450a-48t is there a way to put more than one command on the command line ? e.g. in UNIX commands can be separated by a semi-colon</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54288#M15457</link>
      <description>I can't test right now, but would inserting a \n between commands would work? Worth the try.&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jan 2015 22:32:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54288#M15457</guid>
      <dc:creator>Stephane_Grosj1</dc:creator>
      <dc:date>2015-01-08T22:32:00Z</dc:date>
    </item>
    <item>
      <title>RE: On an X450a-48t is there a way to put more than one command on the command line ? e.g. in UNIX commands can be separated by a semi-colon</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54289#M15458</link>
      <description>Below is a perl script which I used to modify for all networking devices.&lt;BR /&gt;
You just need to have similar commands in TCL and it will work&lt;BR /&gt;
&lt;BR /&gt;
use Net::Telnet;$telnet = new Net::Telnet ( Timeout=&amp;gt;10,Errmode=&amp;gt;'die');&lt;BR /&gt;
$telnet-&amp;gt;open('10.209.70.x');&lt;BR /&gt;
$telnet-&amp;gt;login('admin', 'admin');&lt;BR /&gt;
print $telnet-&amp;gt;cmd('configure');&lt;BR /&gt;
print $telnet-&amp;gt;cmd('run show version');&lt;BR /&gt;
sleep 1;&lt;BR /&gt;
print $telnet-&amp;gt;cmd('run show interfaces ge-0/0/0 brief | grep Physical ');&lt;BR /&gt;
sleep 1;&lt;BR /&gt;
print $telnet-&amp;gt;cmd('exit');&lt;BR /&gt;
print $telnet-&amp;gt;cmd('set cli screen-length 0'); ------------Instead say disable clipaging&lt;BR /&gt;
print $telnet-&amp;gt;cmd('configure');&lt;BR /&gt;
print $telnet-&amp;gt;cmd(' run show log messages | grep ge-0/0/0 | last 10 ');#this works now&lt;BR /&gt;
sleep 10;&lt;BR /&gt;
$counter = 0;&lt;BR /&gt;
while ($counter &amp;lt; 3)&lt;BR /&gt;
{&lt;BR /&gt;
chomp ();&lt;BR /&gt;
open (FILE, "&amp;gt;gilly.txt");&lt;BR /&gt;
print FILE (print $telnet-&amp;gt;cmd(' run show spanning-tree interface '));&lt;BR /&gt;
sleep .5;&lt;BR /&gt;
close (FILE);&lt;BR /&gt;
$counter = $counter + 1;&lt;BR /&gt;
}</description>
      <pubDate>Thu, 08 Jan 2015 22:48:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54289#M15458</guid>
      <dc:creator>PARTHIBAN_CHINN</dc:creator>
      <dc:date>2015-01-08T22:48:00Z</dc:date>
    </item>
    <item>
      <title>RE: On an X450a-48t is there a way to put more than one command on the command line ? e.g. in UNIX commands can be separated by a semi-colon</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54290#M15459</link>
      <description>Actually, I do have a use case where having multiple commands in one line would be extremely useful: Changing IP addresses. Doing a&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;unconfigure vlan OldMgmtVLAN ipaddress ; configure vlan NewMgmtVLAN ipaddress [list=1]&lt;/BLOCKQUOTE&gt;would be faster and easier than writing a script to do this. Yes, it's just a matter of convenience, but hey...</description>
      <pubDate>Fri, 09 Jan 2015 15:33:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54290#M15459</guid>
      <dc:creator>rbrt</dc:creator>
      <dc:date>2015-01-09T15:33:00Z</dc:date>
    </item>
    <item>
      <title>RE: On an X450a-48t is there a way to put more than one command on the command line ? e.g. in UNIX commands can be separated by a semi-colon</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54291#M15460</link>
      <description>Maybe my comment to John's post is a bit hidden.&lt;BR /&gt;
&lt;BR /&gt;
I can't test right now, but would inserting a \n between commands would work? Worth the try.&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Jan 2015 15:38:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54291#M15460</guid>
      <dc:creator>Stephane_Grosj1</dc:creator>
      <dc:date>2015-01-09T15:38:00Z</dc:date>
    </item>
    <item>
      <title>RE: On an X450a-48t is there a way to put more than one command on the command line ? e.g. in UNIX commands can be separated by a semi-colon</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54292#M15461</link>
      <description>Hi All, many thanks for all of your replies. I have used the Unix Expect TCL Script to resolve my issue but I found the only way I could get the Expect script to interact with the ExtremeOS was to 'send' all of the commands I want to run in one command line separated by '\n'. For example, for those familiar with Expect TCL scripting, this is the line I use "send -- "disable clipaging\nshow l2stats\nshow ipstats\nshow port statistics no-refresh\n\n"". So the solution I found is a combination of your suggestions. Thanks again for your replies. &lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Jan 2015 18:54:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54292#M15461</guid>
      <dc:creator>John_Nicolson</dc:creator>
      <dc:date>2015-01-09T18:54:00Z</dc:date>
    </item>
    <item>
      <title>RE: On an X450a-48t is there a way to put more than one command on the command line ? e.g. in UNIX commands can be separated by a semi-colon</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54293#M15462</link>
      <description>Nice to hear that you fixed it.&lt;BR /&gt;
If you can paste the script here it will help many people looking for similar solution.</description>
      <pubDate>Fri, 09 Jan 2015 19:01:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/on-an-x450a-48t-is-there-a-way-to-put-more-than-one-command-on/m-p/54293#M15462</guid>
      <dc:creator>PARTHIBAN_CHINN</dc:creator>
      <dc:date>2015-01-09T19:01:00Z</dc:date>
    </item>
  </channel>
</rss>

