FTP xlsx file doesn't work ...contains wierd characters.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting FTP xlsx file doesn't work ...contains wierd characters.
# 1  
Old 05-26-2015
FTP xlsx file doesn't work ...contains wierd characters.

Guys,
I've a xlsx file containing pivot tables and my job is to FTP it from one Linux terminal to another.

I use the script below :
Code:
ftp -in xxxx > /ftp.log 2>&1 <<EOT
user xxx yyyy
binary
cd <directory>
put xxx.xlsx `basename xxx.xlsx`
bye
EOT

After the file is received in the FTP location & subsequently moved to windows terminal, I see the file containing weird characters and is corrupted.

Could someone suggest me the resolution?

Regards,
Bugs

Last edited by Don Cragun; 05-26-2015 at 11:24 PM.. Reason: Add CODE and ICODE tags.
# 2  
Old 05-27-2015
Do you mean characters that look like ^M? Since you used binary transfer I would guess you know about carriage control characters in DOS and UNIX.

Do the two machines (source and destination) have identical locales?
# 3  
Old 05-27-2015
How did the file arrive on the original linux host? It may be already corrupted.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

PING to AIX works but TELNET FTP SSH doesn't work

root@PRD /> rsh DR KFAFH_DR: protocol failure due to unexpected closure from server end root@PRD /> telnet DR Trying... Connected to DR. Escape character is '^]'. Connection closed. root@PRD /> ftp DR Connected to KFAFH_DR. 421 Service not available, remote server has closed connection... (2 Replies)
Discussion started by: filosophizer
2 Replies

2. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies

3. Shell Programming and Scripting

FTP XLSX file from UNIX to windows

Hi, Could someone suggest me how to FTP a xlsx file from unix to windows. I can able to transfer xls file from unix to windows successfully. But if i transfer the xlsx file im not able to open, it through error like "The file format or file extension is not valid" Thanks Rathna (4 Replies)
Discussion started by: Rathnakumar
4 Replies

4. Shell Programming and Scripting

Ssh remote command doesn't work from script file

I have 10 application servers in a distributed architecture generating their own application logs. Each server has application utility to continuously tail the log. for example following command follows tails and follows new logfiles as they are generated server1$ logutility logtype When I run... (8 Replies)
Discussion started by: indianya
8 Replies

5. Shell Programming and Scripting

File permisson doesn't work

Hi, I used below script to check the file permission but it doesnt work. # ls -ltr total 52 -rwx------ 1 root root 1563 Mar 6 14:12 ks-script-t-WIE3 ---x--x--x 1 root root 599 Mar 6 14:14 ks-script-t-WIE3.log -rwx------ 1 root root 553 Mar 6 14:14 ks-script-P4gFC6 drwxrwxr-- 2 root... (7 Replies)
Discussion started by: Pawan Kumar
7 Replies

6. UNIX for Dummies Questions & Answers

Why doesn't this work?

find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \; Returns this failure: mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory I don't know why it's trying... (4 Replies)
Discussion started by: scribling
4 Replies

7. Shell Programming and Scripting

ftp put in shell script -- whole file doesn't upload

Hi I'm having some trouble with a bash shell script that I'm writing. In the script, I'm trying to upload a file to a backup repository using ftp, but the whole file doesn't get uploaded. This is the file's properties at the start (I've highlighted the file size in red): -rw-r--r-- 1 root... (2 Replies)
Discussion started by: Viola
2 Replies

8. UNIX for Dummies Questions & Answers

FTP doesn't work

Hi! I have 2 servers. The firts has vsftpd server with this configuration: # Example config file /etc/vsftpd.conf # # The default compiled in settings are fairly paranoid. This sample file # loosens things up a bit, to make the ftp daemon more usable. # Please see vsftpd.conf.5 for all... (2 Replies)
Discussion started by: Torquemada
2 Replies

9. UNIX for Advanced & Expert Users

FTP Server doesn't work??

I appreciate iif anybody can help me with this issue. I set up a Linux FTP server which is authorized user ID from AD. I do some configuration on vsftpd.conf file but it doesn't work out. I copy these configuration, can you help me to check again as when i connect through browser it always give me... (2 Replies)
Discussion started by: cthinh
2 Replies

10. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies
Login or Register to Ask a Question