10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a simple Expect script to power a system on and off in an endless loop looking for an ERROR message at which point the script should exit. But I need to skip the first 60 seconds after each power on or off and not exit if there are ERROR messages during that time. I thought I could use... (0 Replies)
Discussion started by: David_Gilhooly
0 Replies
2. Shell Programming and Scripting
Hi Team,
I need password prompt between this script .i want to need put password manually. Instead of adding password in script .
Script pause till input password and resume again.
#!/usr/bin/expect
set ip
spawn telnet $ip
expect "login:"
send "USR\r"
expect "*assword*"... (3 Replies)
Discussion started by: Ganesh Mankar
3 Replies
3. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data: I am trying to write a shell script that prompts the user for the password which is "lux" once the correct password... (4 Replies)
Discussion started by: Emin_Em
4 Replies
4. Shell Programming and Scripting
Hi.
Here is beginning of my script
#!/usr/local/bin/expect --
set timeout 15
spawn /usr/local/account.sh -n modify
expect "Password:" {send "mypassword\r"}
But due to some terminal control sequences (or something else, dunno exactly) my password prompt is looking like this:
and expect... (3 Replies)
Discussion started by: urello
3 Replies
5. Shell Programming and Scripting
Hi
Thanks for this amazing forum first, I've been searching answers in it for problems that I've encountered at work.
The only problem I haven't been able to find a fix for, is a ever waiting for prompt problem in Expect when encounter a $ prompt.
I usually set the timeout to -1 cause the... (2 Replies)
Discussion started by: Ikaro0
2 Replies
6. Shell Programming and Scripting
I'm using rsync with the "-e ssh" option so of course it asks for a password using a prompt. Is there a way to tell a script to expect a prompt, wait for it, and give a password when it arrives?
There is a way to give rsync a password as part of its options using a file, but it only works with... (2 Replies)
Discussion started by: davidstvz
2 Replies
7. OS X (Apple)
I'm making a script that will be a double clickable .command file and I need it to prompt for the users admin password.
So far I have:
if ]; then
sudo -p "Please enter your admin password: " date 2>/dev/null 1>&2
if ; then
echo "You entered an invalid password... (2 Replies)
Discussion started by: PatGmac
2 Replies
8. Shell Programming and Scripting
I need to create an automated script where I have to use sudo to switch to multiple user so the script stops and prompts for password, Is there a way I can provide the password in same command only?
Remember that, I cannot disable the password settings of sudo as I dont have rights. (4 Replies)
Discussion started by: gauravgrover50
4 Replies
9. Shell Programming and Scripting
Could someone please help me...I have an expect script. There's a need for a log in during the script and a password is required...right now the password is just a variable in the expect script...what would be the best way to put that in an encrypted flat file and have the expect script pull the... (2 Replies)
Discussion started by: cubs0729
2 Replies
10. UNIX for Dummies Questions & Answers
I've written a shell script to alter a particular preference file on OS X (10.3.9), which works fine (tested by running the script from the terminal sat in front of the box).
Problem is, I now have to run this script remotely across a number of machines via remote desktop, so where I've used the... (1 Reply)
Discussion started by: Brad_GNET
1 Replies