Expect script Execution Problems .. Help!!!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Expect script Execution Problems .. Help!!!
# 1  
Old 08-08-2012
Question Expect script Execution Problems .. Help!!!

Hi Guys,

I am writing the expect script which take input from the txt file and check whether that file is present over the Sftp or not.If yes then delete other wise check the next one.. I am able to do comparison online for single file...

Please also note still i didn't try to implement delete part.

Please check given below code and provide me the suggestion.

Error in this code:Can't do comparison for multiple files.

Last edited by hackerdilli; 08-08-2012 at 03:01 PM.. Reason: code tags, please!
# 2  
Old 08-08-2012
The reason you need to use a third-party brute-force hacking tool to inject plaintext passwords into sftp is because it's designed to prevent you from doing this for security reasons. It's a subtle hint, written in mile-high flashing neon letters, that it is a really bad idea.

If you use ssh keys the way they're designed to work, your program becomes much simpler and doesn't need expect at all.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Execution problems

How to find a word in a directory which contains many files? i just want to count how many such words are present in all the files? This is the code which i tried for a single file echo "Enter the file name:" read file echo "Enter the word to search:" read word if then echo "The count... (4 Replies)
Discussion started by: Meeran Rizvi
4 Replies

2. Shell Programming and Scripting

Problems with expect

Hi, I am writing a script to enter into a list of servers and take the backup of the cronjobs on that servers... ============================== -bash-3.00$ expect spawn.exp ssh rcdn6-vm59-33 spawn ssh servers1 /CODE]==================== -bash-3.00$ cat spawn.exp #!/usr/bin/expect eval... (1 Reply)
Discussion started by: satishkumar432
1 Replies

3. Shell Programming and Scripting

Execution Problems

this my source file ************* fixed *************** Begin equipmentId : d9 processor : fox number : bhhhhhh Variable # 1: Id : 100 Type : 9 nType : s gType : 5f mType : 4 LField : England DataField : london Length ... (6 Replies)
Discussion started by: teefa
6 Replies

4. Shell Programming and Scripting

Execution problems with BASH Shell Script

Hi I need help with my coding , first time I'm working with bash . What i must do is check if there is 3 .txt files if there is not 3 of them i must give an error code , if al three is there i must first arrange them in alphabetical order and then take the last word in al 3 of the .txt files... (1 Reply)
Discussion started by: linux newb
1 Replies

5. AIX

SH Script Execution Problems with Cronjob

Hi, I have created a sh script to startup and shutdown the oracle database, when I execute the script thru command line it execute successfully, but when I call the script thru cronjob it does not execute. The scripts are as follows: LOG=/oracle/times.log export ORACLE_SID=prod echo... (6 Replies)
Discussion started by: lodhi1978
6 Replies

6. Shell Programming and Scripting

Execution Problems!!

i have been working on this for a about 12 hours today say's end of file un expected any idea's using the bourne shell and its driving me nuts worked fine in bash but prof says make it work in bourne and good luck worth 13% any help would be awesome #!/bin/sh trap "rm mnt2/source/tmp/* 2>... (1 Reply)
Discussion started by: mrhiab
1 Replies

7. Shell Programming and Scripting

Execution Problems with bash script

Hello, can someone please help me to fix this script, I have a 2 files, one file has hostname information and second file has console information of the hosts in each line, I have written a script which actually reads each line in hostname file and should grep in the console file and paste the... (8 Replies)
Discussion started by: bobby320
8 Replies

8. Shell Programming and Scripting

Expect Issue Serial Forground Execution vs Concurrent Background Execution

I have an expect script that interrogates several hundred unix servers for both access and directories therein using "ssh user@host ls -l /path". The combination of host/path are unique but the host may be interrogated multiple times if there are multiple paths to test. The expect script is run... (2 Replies)
Discussion started by: twk
2 Replies

9. OS X (Apple)

Execution Problems with ASU Shell Script

Hello. I have been trying to create a shell script that checks to see if there are software updates and if not, then exit the script. If so, then check to see if a user is logged in. If a user is logged in, it will only install the updates. If a user is not logged in, then it will display a... (3 Replies)
Discussion started by: Talcon
3 Replies

10. Shell Programming and Scripting

Expect script with file input problems

Hello, I am trying to write an expect script that will ssh into a large number of Cisco routers and add some commands via the cli. The script I wrote works great for one host however I have over 350 routers that this needs to be added to. The problem is I cannot get the script to read the file of... (1 Reply)
Discussion started by: meberline
1 Replies
Login or Register to Ask a Question