The UNIX and Linux Forums  

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
FTP run from shell script gives slow transfer rates Countificus Shell Programming and Scripting 8 04-07-2009 05:50 PM
Binary File transfer from AIX Unix to Red Hat Linux shunter63 Linux 2 04-03-2009 06:07 PM
transfer a variable in a shell script? fedora Shell Programming and Scripting 11 09-22-2006 01:56 PM
shell script conversion to binary bcheaib Shell Programming and Scripting 3 08-01-2004 05:41 AM
Binary File Transfer DPAI High Level Programming 2 03-04-2002 03:12 PM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-16-2009
alkaa00 alkaa00 is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 3
HELP - Transfer File as Binary in FTP Shell Script Problems

Hey Everyone,

Can someone please help me with my problem.

I am writing a FTP Shell Script but I want it to convert the file I created to binary before the FTP is executed.

Notice I already have 'binary' in the script. I have tried setting the parameter to binary but my problem is that when the script is executed and the file is sent to my server just fine but the file is still in ASCII mode when I type the 'file test.txt' command.

Does anyone know how to transfer files in binary mode?

Here is my simple script:

#!/bin/sh

filename="file.txt"
hostname="####.com"
username="me"
password="1234"

ftp -un $hostname <<EOF
quote USER $username
quote PASS $password

binary
put $filename
quit
EOF


Thanks
 

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:22 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