I want to upload a file to remote server through ftp
daily.Can anyone suggest how to make a shell script for
that.I hv credentials for that ftp



I want to upload a file to remote server through ftp daily.Can anyone suggest how to make a shell s..

Answer / geichel

#!/bin/bash

/bin/ftp -inv ip_address_of_target_station<<ENDFTP
user ftpusername ftpuserpassword
cd folder_on_target
bin
lcd folder_on_local
put filename.txt
bye
ENDFTP

# Alternatively some ftp packages let you put a script in
$HOME/.netrc

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Shell Script Interview Questions

write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?

0 Answers   Wells Fargo,


What is shell terminal?

0 Answers  


Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

0 Answers  


What is use of "cut" command?

3 Answers  


What is shell scripting?

0 Answers  


Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.

0 Answers  


What does path stand for?

0 Answers  


How will you pass and access arguments to a script in linux?

0 Answers  


Why is a script important?

0 Answers  


What is inside a seashell?

0 Answers  


What are the advantages of shell script?

0 Answers  


Write a shell script in Linux to shift all characters in a file forward by five characters. (Thus “a” becomes “f’”).

2 Answers   Ignou, Tripura Info,


Categories