.netrc does not execute mput command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting .netrc does not execute mput command
# 15  
Old 09-30-2011
Perhaps how the machine line is handled is implementation-specific? It worked fine, as given, on AIX.

I would test it on OS X, but I have nothing to FTP to... I use scp whenever something needs to be copied Smilie
# 16  
Old 10-03-2011
Just to try ...

what server scp (for win) really 'fast to try' can i download just to do a test... ? ThnX in Adv Smilie
# 17  
Old 10-03-2011
I haven't used it, but there's WinSCP, that seems to be quite popular.

Is there a problem with the previous suggestion?

Your .netrc file:
Code:
machine 192.168.27.147
login user
password 12345
macdef backup
binary
cd /tmp/elaboralog
prompt
mput *-file.txt
quit
(blank line)

Your script:
Code:
ftp -i 192.168.27.147 2100 << ! > /tmp/elaboralog/ftp_log_phase2
$ backup
!

# 18  
Old 10-04-2011
winscp? is there also a server version?

---------- Post updated at 09:45 AM ---------- Previous update was at 09:44 AM ----------

Quote:
Originally Posted by Scott
I haven't used it, but there's WinSCP, that seems to be quite popular.

Is there a problem with the previous suggestion?

Your .netrc file:
Code:
machine 192.168.27.147
login user
password 12345
macdef backup
binary
cd /tmp/elaboralog
prompt
mput *-file.txt
quit
(blank line)

Your script:
Code:
ftp -i 192.168.27.147 2100 << ! > /tmp/elaboralog/ftp_log_phase2
$ backup
!

This morning i'will be again on the customer office. I'll try... SmilieSmilie (TnX very much for support).

---------- Post updated at 10:17 AM ---------- Previous update was at 09:45 AM ----------

Quote:
Originally Posted by mirrorx
winscp? is there also a server version?

---------- Post updated at 09:45 AM ---------- Previous update was at 09:44 AM ----------



This morning i'will be again on the customer office. I'll try... SmilieSmilie (TnX very much for support).

IT WORKS!

---------- Post updated at 10:56 AM ---------- Previous update was at 10:17 AM ----------

IT WORKS!!! Thank you very much.
The last line was definitively working. SmilieSmilieSmilie

Moderator's Comments:
Mod Comment Great! Smilie


---------- Post updated at 11:28 AM ---------- Previous update was at 10:56 AM ----------

I don't know why but... the lines just after the ftp command are not executed...

The script:
Code:
echo "Inizio trasferimento FTP"

ftp -i 192.168.27.147 2100 << ! > /tmp/elaboralog/ftp_log_fase2

$ backup

echo "Cleaning folder Elaboralog"

rm -f /tmp/elaboralog/$ann_$mes_$gio_*

echo "End phase2 for day $ann_$mes_$gio_" >> /tmp/elaboralog/log_fase2

# 19  
Old 10-04-2011
You missed a closing "!" for the here-document:

Code:
echo "Inizio trasferimento FTP"

ftp -i 192.168.27.147 2100 << ! > /tmp/elaboralog/ftp_log_fase2

$ backup
!
echo "Cleaning folder Elaboralog"

rm -f /tmp/elaboralog/$ann_$mes_$gio_*

echo "End phase2 for day $ann_$mes_$gio_" >> /tmp/elaboralog/log_fase2

# 20  
Old 10-04-2011
MySQL

Quote:
Originally Posted by Scott
You missed a closing "!" for the here-document:

Code:
echo "Inizio trasferimento FTP"

ftp -i 192.168.27.147 2100 << ! > /tmp/elaboralog/ftp_log_fase2

$ backup
!
echo "Cleaning folder Elaboralog"

rm -f /tmp/elaboralog/$ann_$mes_$gio_*

echo "End phase2 for day $ann_$mes_$gio_" >> /tmp/elaboralog/log_fase2


Tnk U Very Much.
Everything works now.Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies

2. Shell Programming and Scripting

Second try mput failed

I'm having few doubts with below questions not able figure out the reason: mput operation used via shell script failed with 550 code return from FTP - "Overwrite cannot be done". ( Having all permissions to this directory ) but why got failed. When trying to run the script again but now it... (3 Replies)
Discussion started by: Gautham
3 Replies

3. Shell Programming and Scripting

When i am trying to execute export command within a shell script it is saying command not found.

I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found" My code is as follows: -------------------------- #!/bin/sh user="test" DIR="/bldtmp/"$user VIEW="test.view1" echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies

4. Shell Programming and Scripting

mput question

I want to mput a file without extension, and while doing the mput i want to include the .txt as an extension to the file name. How can i do that? (2 Replies)
Discussion started by: wizardofoz
2 Replies

5. UNIX Desktop Questions & Answers

How to grep and pipe to mput ftp

I am ptting the following into an FTOP script. date=`TZ="aaa24" date +'%Y%m%d'` # this gets Yesterday date . . . . mput < 'l | grep $Vdate' # the idea to grep a listing from a directory that has yesterday date in its file name then put it in the remote FTP server. How can I get it... (4 Replies)
Discussion started by: raouf@comcast.n
4 Replies

6. Shell Programming and Scripting

SFTP - 'put' doing an 'mput'

Hi guys, I'm having a problem with F-Secure Unix. When I try a simple command; sftp> put local.test remote.test I expect that the local file local.test would be copied to the remote file remote.test However sftp is attempting to copy local.test & remote.test from the local machine, as if... (2 Replies)
Discussion started by: b0bbins
2 Replies

7. Shell Programming and Scripting

mput is not working in ftp script

1)In this script mput command is not working( not transfering multiple files, it is able to send single file) 2)here is the script to automate the ftp process . 3)for transfering files from one machine to other machine using ftp can anyone can give me the solution in this issue Script is... (6 Replies)
Discussion started by: gsri
6 Replies

8. Solaris

FTP limits - mput *

I am trying to upload via FTP 11,000 files in a Solaris 8 system. I am using Windows 2000 and its FTP client to upload the files. The command used is mput *.jpg.When the quantity of files reaches 10,000 the upload aborts. Is this problem related with the FTP client ? If yes, another FTP client... (2 Replies)
Discussion started by: waldecy
2 Replies

9. UNIX for Dummies Questions & Answers

Plz Help : How to use write command to execute command on some other terminal

Hi Group , I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages. - i m writing >write user-id ! ls o ctrl-d inspite of executing the command ls,other terminal shows ! ls. Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies

10. UNIX for Dummies Questions & Answers

mget and mput...

hello, i was interested in knowing if you can mget or mput a sequence of files: example- say i have a dir with 1000 files with the same extension e.g. *.sgi, is there a way to mget only the last 200 files? i would assume that there is a flag i would use, or something like: mget... (14 Replies)
Discussion started by: yoyomamma
14 Replies
Login or Register to Ask a Question