LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 01-06-2010, 11:04 AM   #1
psychobyte
Member
 
Registered: Sep 2003
Location: Central Coast, California
Posts: 179

Rep: Reputation: 30
scripting commandline args to switches - network hardware


Hi,

I have some network switches that I can login to via ssh and run commandline arguments (not a bash environment). Is there an way/app out there that would allow me to pass commandline arguments to the switch then wait and get the command output. ALl this over ssh?

Any suggestions would be appreciated.

Thanks.
 
Old 01-06-2010, 11:18 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,082

Rep: Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714
Quote:
Originally Posted by psychobyte View Post
Hi,

I have some network switches that I can login to via ssh and run commandline arguments (not a bash environment). Is there an way/app out there that would allow me to pass commandline arguments to the switch then wait and get the command output. ALl this over ssh?

Any suggestions would be appreciated.

Thanks.
Sure, you could use expect to do that, especially if you've got SSH going already. If you can type in a command, expect can automate it.

There's tons of info on Google related to it, but a couple I thought were useful are:
http://www.linuxjournal.com/article/3065
http://www.osix.net/modules/article/?id=30

The "autoexpect" feature is nice, if you work with it. It'll watch a session as you type, and write the expect script for you.
 
  


Reply

Tags
command line, script, switch


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux commandline scripting abubin Linux - General 2 06-13-2006 06:07 AM
Good Network Switches? Matir Linux - Networking 0 02-02-2005 01:29 PM
Network switches ToothlessRebel Linux - Networking 1 01-05-2005 02:38 PM
Setting up home network with two switches PJ1382 Linux - Networking 4 10-15-2004 08:34 AM
Very simple hardware question: Daisy-chaining switches? azzurro Linux - Networking 3 08-24-2004 07:59 AM


All times are GMT -5. The time now is 02:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration