![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| within shell script send expect and if else | mnmonu | Shell Programming and Scripting | 1 | 04-20-2009 05:41 AM |
| Using Expect results in a Shell script | kaltekar | Shell Programming and Scripting | 2 | 10-17-2008 09:08 AM |
| Using expect script in a shell script or vice versa | nua7 | Shell Programming and Scripting | 0 | 07-18-2008 07:16 AM |
| Need help with Expect and Shell script | tonan | Shell Programming and Scripting | 1 | 04-10-2008 10:45 PM |
| Password changing in a Script (shell and expect) | chellam | Shell Programming and Scripting | 1 | 08-14-2006 11:12 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
within shell script send expect and if else
Hi,
I have written one shell script , using that i am able to connect to remote machine but i have to #!/usr/bin/expect -f set address [lindex $argv 0] set username [lindex $argv 1] set password [lindex $argv 2] set OOLpath [lindex $argv 3] set dbusername [lindex $argv 4] set dbpasswd [lindex $argv 5] set tnsname [lindex $argv 6] set recdbusername [lindex $argv 7] set recdbpasswd [lindex $argv 8] set rectnsname [lindex $argv 9] spawn ssh ${username}@${address} expect "${username}@${address}'s password:" send -- "${password}\r" expect "$ " send -- "cd ${OOLpath}\r" expect "$ " send -- "cd Client\conf\r" ##########IF-ELSE Block expect eof but I need to check if one file(named parfile) is exist or not and if exist then change some parameter value cat parfile dbtnsname = clienttns dbuserid = scott dbpasswd = tiger and if not exist then copy from some directory and then change parameter dbuserid,dbpasswd value. Please Please help me.Thanks in advance. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|