10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dear Tech Guys,
I am trying to send some commands on the local server and it always asks for user name and password after each command. To serve the purpose I am using expect function as follows:
#!/usr/bin/expect
set timeout 20
spawn "./data1.sh"
expect "Please Enter UserName: "... (6 Replies)
Discussion started by: Xtreme
6 Replies
2. Shell Programming and Scripting
Hey All,
I am writing one script using expect, that script which is used in spawn will accepts only 1. Enter 2. Ctrl+c
Press Control-C to exit, Enter to proceed.
Could some one share some thoughts to send the above user inputs in linux expect block ?
Thanks,
Sam (0 Replies)
Discussion started by: SCHITIMA
0 Replies
3. Shell Programming and Scripting
Hello Everyone,
I am executing a unix script which logs into 50+ servers (netapp servers) and runs some commands and captures output locally. Below is the code snippet. file1.txt has names of all the remote servers where I am logging in.
#!/bin/ksh
#!/usr/bin/expect
touch... (1 Reply)
Discussion started by: rahul2662
1 Replies
4. Shell Programming and Scripting
hi
i want to automate fdisk command .
i spawned a process containing fdisk command from a process
and tried to send the options to fdisk promt from that process.
but that spawed process is notstarting itself
help me out
trying for two days
:wall:
my code:
#!/bin/bash
echo... (5 Replies)
Discussion started by: jagak89
5 Replies
5. Shell Programming and Scripting
Hi, the following code is not working. How can I cat the last modified file in the path /asdf. Please help!
expect "asdf%" {send "cat `ls -rt /asdf|tail -1` \r"} (2 Replies)
Discussion started by: thulasidharan2k
2 Replies
6. Shell Programming and Scripting
Hi
I am programing a expect script on debian, I connected to a firewall to get configuration copy via telnet or ssh but Because of firewall show configuration console wait and print --More-- need press space key at least 100.Help me please.
firewall output like this :(
This output isn't... (3 Replies)
Discussion started by: ayucelen
3 Replies
7. UNIX for Advanced & Expert Users
Hi
I have a shell script A which calls another 10 shell scripts which run in background. How do i make the parent script wait for the child scripts complete, or in other words, i must be able to do a grep of parent script to find out if the child scripts are still running.
My Code:
... (1 Reply)
Discussion started by: albertashish
1 Replies
8. Shell Programming and Scripting
Did not use 'wait' yet.
How I understand by now the wait works only for child processes, started background.
Is there any other way to watch completion of any, not related process (at least, a process, owned by the same user?)
I need to start a background process, witch will be waiting... (2 Replies)
Discussion started by: alex_5161
2 Replies
9. Shell Programming and Scripting
HI All,
I am currently working on one command line application on AIX (Unix Platform).Here i need to use Expect package.
By using Expect package at the top of the script,i want to use just Send command of Expect package to send characters like,
1. Press Enter key
2. Press spacebar
3.... (6 Replies)
Discussion started by: neha123
6 Replies
10. Shell Programming and Scripting
Dear All,
I wanna write a script in which it expect something and if it gets whats expected then send the command relating to that.
for instance
Userame: Asad
Required Password for Asad: ******
I tried to use the expect key word but its does not work.
I am using Solaris 8/9
If... (1 Reply)
Discussion started by: asadlone
1 Replies