ftp in Shellscript


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users ftp in Shellscript
# 1  
Old 06-11-2004
Question ftp in Shellscript

Can I do something like this from a shellscript ?:

ftp 12.34.56.78 <<!
username
password
put a.c
bye
!

It does not go through as the login fails.
Is there any alternative to do the above requirement?

Thanks in advance.
Gowrish
# 2  
Old 06-11-2004
man netrc
# 3  
Old 06-11-2004
Please navigate:
Our Home Page -> Answers to Frequently Asked Questions -> Automate FTP / Scripting FTP Transfers
# 4  
Old 06-11-2004
ftp in shellscript

I did not want to use netrc.

I have found a solution as below:

ftp -n 12.34.56.78 << !
user username password
put a.c
bye
!

This works. Thanks anyways.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Solved] Simple Shellscript for uploading files to a specific folder on a ftp-server?

hi! Iam using my D-link DNS-320 (NAS) with fun_plug installed (a unix client) I am currently using cron to run a shellscript running a java-application that creates a couple of txt files. These files needs to be uploaded to a specific folder on my webhosts ftp server-account. I need a... (16 Replies)
Discussion started by: Nigge
16 Replies

2. Shell Programming and Scripting

Execution problem with the FTP shellscript

Hi Friends I am new to the shell script and i have a script which will connect to server enviornment which will read a file and will FTP to an another server location. But while executing this script FTP transfer is not occuring. But when I enter in FTP mode I am able to transfer the file... (5 Replies)
Discussion started by: Kannannair
5 Replies

3. Shell Programming and Scripting

'*' not working in shellscript

Hi, To Archive files, I try to move files from one directory to another directory . So i used the below logic, #!/bin/ksh ****Archive***** mv ${DATA_DIR}/ABC_.dat ${ARCHIVE} So if i give the complete file name its working fine. But if i use '*', im getting the below error, mv:... (18 Replies)
Discussion started by: Bopty
18 Replies

4. Shell Programming and Scripting

Help with shellscript

I am new in shell script i want to convert .txt file in the format axsjdijdjjdk to a x s j d i j d j j d k (5 Replies)
Discussion started by: sreejithalokkan
5 Replies

5. Post Here to Contact Site Administrators and Moderators

help with backup shellscript

can any one advice on this.. create archive backup -yyyymmdd.tr.gzin the directory "backup" that includes the following directory " product/dev","product/uat"and product/maintain", yymmdd, stand for current date This archive needs to be perpared at 9PM every day Thanks advance (1 Reply)
Discussion started by: ksakil
1 Replies

6. UNIX for Dummies Questions & Answers

How can I do aliasing in shellscript?

#Example.sh alias rmv 'sh Example2.sh' when i execute exapme.sh alias name not working. how i solve this problem?? (9 Replies)
Discussion started by: arun508.gatike
9 Replies

7. Shell Programming and Scripting

Need help with shellscript

Hello. I am a novince at writing shell scripts but here is the question. I have to write a shell script that does the following: Once executed via crontab, the script should do the following: a. get date/time stamp in for format 10-MAR-05 and b. execute shell script my_script.sh (which... (2 Replies)
Discussion started by: jigarlakhani
2 Replies

8. Programming

Shellscript for MQSeries

Iam new to shellscript. 1)How to strart QUERYMANAGER using shellscript. 2)How to put and get messages in MQSeries using shellscripts. 3)iam using local queues . Thanks lot. (0 Replies)
Discussion started by: ram2s2001
0 Replies
Login or Register to Ask a Question