LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-25-2013, 04:23 PM   #1
Silver565
Member
 
Registered: Jul 2007
Distribution: Ubuntu, Windows, Freenas
Posts: 96

Rep: Reputation: 15
Angry Bash script - using "expect"?


I'm trying to write a script that will login to a sonicwall and run the export config command for me. Now... sonicwalls are quite annoying, you can't pass your username straight in, they look like this http://tinyurl.com/atawg5l)

So I somehow, have to tell the script to pass my username and password in and then run the one line command I'd like.

Any ideas? Should I be using expect?

Really doing my head in...
 
Old 02-26-2013, 03:02 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
autoexpect is the easiest way to write expect scripts. You just do stuff and it learns to copy you.
 
Old 02-27-2013, 12:43 AM   #3
Silver565
Member
 
Registered: Jul 2007
Distribution: Ubuntu, Windows, Freenas
Posts: 96

Original Poster
Rep: Reputation: 15
Thankyou
 
  


Reply



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
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 01:03 AM
[SOLVED] troubles with bash script tests "-z" and "-n" SaintDanBert Linux - Software 7 04-10-2012 09:26 AM
My "expect" script is not working... Won't "send" commands... edomingox Programming 4 04-02-2009 03:25 PM
How to write a bash script to replace all "KH" to "K" in file ABC??? cqmyg5 Slackware 4 07-24-2007 09:00 AM
Expect script throws "open(slave pty): bad file number" error KNut Linux - Newbie 0 02-24-2004 12:24 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:11 PM.

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
Open Source Consulting | Domain Registration