The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
urgent help needed in telnet issue sam99 Shell Programming and Scripting 2 12-16-2008 11:36 AM
Unix Arithmatic operation issue , datatype issue thambi Shell Programming and Scripting 23 02-19-2008 07:19 AM
Reg : telnet password issue sam99 Shell Programming and Scripting 3 11-28-2007 04:57 AM
Telnet issue E5500/V480 kjbaumann SUN Solaris 5 01-24-2007 08:16 PM
telnet refused / reverse DNS issue? rm -r * UNIX for Dummies Questions & Answers 4 10-08-2004 02:00 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-15-2007
sam99 sam99 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 39
telnet issue

Hi ,

i am a beginner in AIX.
please find my doubt

I am calling the below script named test_1 by " sh test_1 | telnet "

cmd1="var1=100"

echo open $Infahost
sleep 1
echo $Infaftplogin
sleep 1
echo $Infaftppasswd
sleep 1
echo $cmd1
sleep 5
echo $var1
sleep 5
echo exit

why am i not getting 100 when i am echoing "var1" (echo $var1)
please correct me if i am wrong...


thanks in advance
sam
  #2 (permalink)  
Old 11-15-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
What are you trying to achieve?
  #3 (permalink)  
Old 11-15-2007
sam99 sam99 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 39
i want to login to a secured file server and copy one folder to another folder. I neeed to provide sleep based on the size of the folder.

i am using slogin to login to the server...

thanks for reply
sam
  #4 (permalink)  
Old 11-15-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
what is the sleep for?

what are you using telnet for?
  #5 (permalink)  
Old 11-15-2007
sam99 sam99 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 39
1.only a specific user has got access to use slogin to the file server
so we are loging in as that user using telnet...

2.sleep is to provide time delay for copying...( as i understood)
if i provide a small sleep value all files are not copied..







Quote:
Originally Posted by porter View Post
what is the sleep for?

what are you using telnet for?
  #6 (permalink)  
Old 11-15-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
You should not need the sleep.

Personally I would use "ssh" rather than "telnet".

Quote:
why am i not getting 100 when i am echoing "var1" (echo $var1)
... because you should be doing "echo \$var1" so that the shell expansion happens on the other machine?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0