Expext Script excution problem..


 
Thread Tools Search this Thread
Top Forums Programming Expext Script excution problem..
# 1  
Old 08-09-2012
Question Expext Script excution problem..

Hey Guys ,
iam trying to match to string in TCL scripts but it not working .

Its only working true condition to print yes.. When condtion fail then even it prints YES

Any suggestion this ??
Code:
if {[regexp "$data.*\n(.*).*\nsftp.*" $results]} {                                                           
puts"yes"                                                                                            
 } else {                                                                                             puts "no"                   
}

Nick

Last edited by jim mcnamara; 08-09-2012 at 10:54 AM..
# 2  
Old 08-09-2012
I see an sftp in there...

Are you trying to bludgeon sftp into accepting noninteractive plaintext passwords with a third-party brute-force hacking tool? It'd be better just to use keys and avoid the entire problem.
# 3  
Old 08-09-2012
Seems to work fine:
Code:
% puts $data
HI
% puts $results
THERE HU asdas
(asasa) asas
sftp)
% if {[regexp "$data.*\n(.*).*\nsftp.*" $results]} {
puts "yes"} else {puts "no" }
no

# 4  
Old 08-10-2012
Buddy i am trying to for my peronal suff and using the proper
authentications... I have to automate the script to delete file when i pass no of file with the input file.... No hacking is there in this scenario..




Quote:
Originally Posted by Corona688
I see an sftp in there...

Are you trying to bludgeon sftp into accepting noninteractive plaintext passwords with a third-party brute-force hacking tool? It'd be better just to use keys and avoid the entire problem.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Customized command excution

Hi, The below commands will be inside a KSH script and SOLARIS machine. Command-1 //Executes in 10s,5s,..5mins,etc TIMER = Look for Command-1 execution status - IF finished in 25secs move to next command in the script IF NOT kill above command and move to next command. Command-2 Any... (9 Replies)
Discussion started by: penqueen
9 Replies

2. Linux

clarification for cmd excution

Hi Code: nohup sar -u 10 $COUNT | awk 'NR>2 {$2=$4=$7="";}1' | tr -s ' ' '\t' 2>/dev/null >sar.out & i have execute above line from shell script .. but sar.out is created with ZERO bite size.. Help on that what is the problem here (1 Reply)
Discussion started by: Mani_apr08
1 Replies

3. Shell Programming and Scripting

Problem running a program/script in the background from a script

Hi all, I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion. My problem is sometimes the program takes... (5 Replies)
Discussion started by: newbie_01
5 Replies

4. Shell Programming and Scripting

Excution Problems with loading huge data content and convert it

Hi, I got long list of referred file content: CGTGCFTGCGTFREDG PEOGDKGJDGKLJGKL DFGDSFIODUFIODSUF FSDOFJSODIFJSIODFJ DSFSDFDFSDOFJFOSF SDFOSDJFOJFPPIPIOP . . . Input file content: >sample_1 SDFDSKLFKDSLSDFSDFDFGDSFIODUFIODSUFSDDSFDSSDFDSFAS (14 Replies)
Discussion started by: patrick87
14 Replies

5. Shell Programming and Scripting

parallel excution for 2000 files.

Hi, I have a function abc(). i am calling the function 9 times. it is working fine and completed the script execution 10 hours. input files: CUSTOMER_INFO_1111_12345.csv CUSTOMER_INFO_1222_12345.csv CUSTOMER_INFO_1322_12345.csv CUSTOMER_INFO_1333_12345.csv CUSTOMER_INFO_1151_12345.csv... (4 Replies)
Discussion started by: onesuri
4 Replies

6. UNIX for Advanced & Expert Users

To find the time of excution of a particular unix command

Hi experts, It would be grateful if you can guide me on the following, 1.How to find the time of excution of a particular unix command. 2. How to find the terminal (IP Address) from where that particular unix command was excuted. 3. How to find the user who executed that particular unix... (1 Reply)
Discussion started by: apsprabhu
1 Replies

7. UNIX for Dummies Questions & Answers

xterm closing automatically after command excution

Hi, I have a commands in a file called commands.file, I am using this file with the following commnad xterm -e "commands.file" After executing this file in the new xterm, it is closing automatically. I want to use that xterm after that. Please help me regarding this? :) ... (4 Replies)
Discussion started by: chaitubek
4 Replies

8. Shell Programming and Scripting

call shell script from perl cgi script problem

hi,, i have perl scipt with line : system('./try.sh $t $d $m'); in shell scipt try.sh i have the line: echo $1 its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Discussion started by: raksha.s
2 Replies

9. Shell Programming and Scripting

ssh script problem problem

Hi Please help me with the following problem with my script. The following block of code is not repeating in the while loop and exiting after searching for first message. input_file ========== host001-01 host001-02 2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Discussion started by: pcjandyala
2 Replies

10. Shell Programming and Scripting

Expext script reading a crypted file

People, I really have two problems in one. Basicly "option 2" is the one I wish to persue but "option 1" will do for now.... Option 1 I have an expect script. I would like it to read (open ) a crypted file with out creating a decrypted file from the source (crypted file) then open and read... (3 Replies)
Discussion started by: Andrek
3 Replies
Login or Register to Ask a Question