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
Performance issue with ftp script. Shiv@jad Shell Programming and Scripting 7 07-03-2009 01:01 PM
Issue with the shell script viv1 Shell Programming and Scripting 2 02-19-2008 12:02 AM
SFTP script issue sdhalepaska UNIX for Dummies Questions & Answers 0 07-05-2007 02:24 PM
Issue in my script chiru_h Shell Programming and Scripting 4 09-27-2006 10:27 AM
Issue with sed in script bthomas Shell Programming and Scripting 3 04-14-2005 05:21 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 04-27-2006
mgirinath mgirinath is offline
Registered User
  
 

Join Date: May 2005
Posts: 69
please help ftp script issue

hi,

I have ftp script where the user name has "\" in it and my script unable to detect it....here is what I am doing...

Code:
`ftp -vin <<- FTP >> log.txt 2>&1
      user ibm\user password
      FTP`
my log says..
user ibmuser not found...

please help.....
  #2 (permalink)  
Old 04-27-2006
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
Try escaping the \

Code:
`ftp -vin <<- FTP >> log.txt 2>&1
      user ibm\\user password
      FTP`
  #3 (permalink)  
Old 04-27-2006
mgirinath mgirinath is offline
Registered User
  
 

Join Date: May 2005
Posts: 69
Tried it...did not work...gives me same result any more ideas please....
  #4 (permalink)  
Old 04-28-2006
hegemaro hegemaro is offline
Registered User
  
 

Join Date: Feb 2006
Location: Schenectady, NY
Posts: 134
Ignoring the awful practice of having punctuation characters other than underscores and hyphens in a username, I was able to get this to work by using a .netrc file

machine localhost login ibm\\user password password

Then using the command line:

Code:
ftp -vi localhost 1>>log.txt 2>&1 <<- FTP
ls
FTP
  #5 (permalink)  
Old 04-28-2006
sysera sysera is offline
Registered User
  
 

Join Date: Feb 2004
Posts: 92
Here is how I do mine with the slash in the username, the quotes around the variable seem to take care of the issue.


HOST='ipaddress'
USER='domain\username'
PASSWD='password'
ftp -v -n $HOST >> ftp.log <<END_SCRIPT
quote USER "$USER"
quote PASS $PASSWD
cd My/Path/To/Files
prompt
bin
mput *
quit
END_SCRIPT
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 04:16 PM.


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