07-13-2009
How can i terminating expect script without terminating SSH connection.
Hi all , i know i ask a lot of question but these are really hard to solve and important question. I send two scripts:
expect.sh:
#!/usr/local/bin/expect
spawn ssh root@172.30.64.163
expect "login:"
send "root\n"
expect "password:"
send "root\n^M"
interact
and
son.sh:
#!/usr/bin/ksh
./expect
if(($(df -k | grep /tmp | awk '{print $4}')<2500000000))
then
exit
email.sh
fi
I am sorry but ı could not find to send scripts in better way.
Now my problem is after executing ./son.sh it goes into "expect.sh" and login but it does not end the "expect" script so it could not continue on "son" script.Also "son" script should work on remote machine. Therefore how can i end the "expect" script without terminating ssh connection.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
just like what the subject said
but the ip is different
example
if now my IP is 192.168.0.50 and my name is seed
if i wanna terminate 192.168.0.55 with the same nick of mine, seed
can i do that ?? and what is the command ?? (2 Replies)
Discussion started by: SeeD
2 Replies
2. Shell Programming and Scripting
Hi,
I'm trying to make a script that reads the console input and terminates with CTRL+D. It's absolutely basic but I don't know how to "read" the CTRL+D. I've tried a bunch of things like
EOT=^D
while //with & without quotations
do
read input
echo $input
done
while
while ]
... (12 Replies)
Discussion started by: sanchopansa
12 Replies
3. UNIX for Dummies Questions & Answers
Hi
I was working on a shell script with randomly shows a page of text from a randomly selected topic .As soon as the page is displayed it callers a timer script which keeps on running indefinitely until the timer script is killed by the user.
This is where I have the problem,if I press... (2 Replies)
Discussion started by: mervin2006
2 Replies
4. HP-UX
Hi!
Just want to know if there is one command that I can use to kill processes by its name.
Thanks. (1 Reply)
Discussion started by: love833
1 Replies
5. Shell Programming and Scripting
I now that this isnt the greatest code around. Im a network guy by trade not a programer .. but needed something to compare config files ...
Anyway ... intermittently, the program terminates.
Ive been looking at the code for a week trying to figure it out and Im stumped. Can anyone provide... (0 Replies)
Discussion started by: popeye
0 Replies
6. Shell Programming and Scripting
hi all,
i m running few batch process through shell script using nohup command but when session get terminated(due to network, reboot of desktop and closing session directly) all processes terminating abnormally and core file is generating.
application batch process is connecting oracle... (4 Replies)
Discussion started by: arvindng
4 Replies
7. Shell Programming and Scripting
Hi all, I connect with SSH connection to remote machine in the script and ı want to logout at half of the script then continue to script. If ı write exit in the script it terminates script not SSH connection. How can i do that please help me (1 Reply)
Discussion started by: fozay
1 Replies
8. Shell Programming and Scripting
Hi All,
I am trying to make a small shell script.In this it will got directory as per variable & run the find command on that directory.There are 120 + directories & not sure all of them are mounted.So the issue is if the directory doesent exists my loops gets terminated. so is there any was... (3 Replies)
Discussion started by: ajaincv
3 Replies
9. UNIX for Advanced & Expert Users
Hi everyone,
I am new to the linux.I wrote a small script and assigning two values to fname and lname and I want if the fname or lname are not given proper name like Toys or Gun the script should terminate and if they are given proper name it should execute.please help thanks:wall:
#!/bin/bash... (4 Replies)
Discussion started by: starter2011
4 Replies
10. UNIX for Dummies Questions & Answers
Sorry if this has been answered. I did search both Google and this site and did find this post: unix.com/unix-dummies-questions-answers/152992-how-ignore-errors-script.html
However, it wasn't answered.
I have the same question - how do you prevent a tcsh script from terminating when the... (4 Replies)
Discussion started by: deepstructure
4 Replies
LEARN ABOUT OPENSOLARIS
purple-send
purple-send(1) User Commands purple-send(1)
NAME
purple-send - calls purple API functions using DBus and prints the return value.
SYNOPSIS
purple-send method-name [type1:value1] [type2:value2] ...
DESCRIPTION
This program calls purple API functions using DBus and prints the return value. If you are not interested in the return value, use purple-
send-async. This shell script just invokes dbus-send, see man dbus-send for how to specify the parameters.
OPTIONS
Use dbus-viewer to get the list of supported functions and their parameters.
Here are some examples:
/usr/bin/purple-send PurpleAccountsFindConnected string: string:prpl-jabber
/usr/bin/purple-send PurpleAccountsGetAll
/usr/bin/purple-send PurpleCoreQuit
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgnome-im-client |
+-----------------------------+-----------------------------+
|Interface stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO
purple-remote(1), purple-send-async(1), purple-url-handler(1), attributes(5)
purple-send Manual, http://pidgin.im/
NOTES
Updated by Lei Ju, Sun Microsystems Inc., 2006, 2007.
SunOS 5.11 02 Apr 2008 purple-send(1)