Here's the code (its works fairly well though I get an occasional timeout)
Changing the TZ variable is an unreliable method of getting yesterday's date.
Quote:
You should put the username and password in your ~/.netrc file.
Quote:
I'd love to know what some things are I can do to improve this in the event of errors etc...
The ftp command is not well-suited to scripting; error handling is one of it weaknesses. For scripting, if you can't use scp (recommended), use the ncftp suite of commands.
Hi guys,
I recently managed to write up my working script, but now I have a problem.
If the file isn't there in the remote server, my actual script jumps it and all ok, but I need something like this:
Search file -> if there, then download -> if not, download next file in the list.
Any... (7 Replies)
I have a bash script that is running a mysql query and creating a csv file with a time stamp. It then uploads that to a ftp server. Everything works great when I manually run it. But then I have a cron job set to run every monday, wednesday and friday at 5am est. When the cron job runs, it... (7 Replies)
Hello, I have a bash script used to telnet and transfer files which works great. Trying to FTP to a box that does not support telnet. Been told to use ssh to the user@someIPaddress. I can log in manually but can't seem to make this script work. And help would be appreciated. #!/bin/bash
HOST=ssh... (17 Replies)
Hello,
I'm trying to make a bash script that send me e-mail if there is any new file in my ftp folder.
cat inotify.sh
#!/bin/sh
/usr/bin/inotifywait -e create \
-mrq /home/mrowcp | while read line; do
echo -n "$line " >> /var/log/inotify.log
echo `date | cut -d " " -f1-4` >>... (3 Replies)
Hello kind programmers :)
I am a newbie and running into an error "line 28: syntax error: unexpected end of file" on the script shown below. Any help would be greatly appreciated. Thanks!
#! /bin/bash
if ($#argv <3) then
echo 'Usage get_modis_snow '
echo 'ftp script for MYD10A2... (2 Replies)
Hello everyone,
sorry for the title, most of you must getting sick of reading something like
this, but I haven't found a solution, although I found many threads according
to it.
I'm working on a bash script that connects to a network printer with ftp
where I want to upload a pdf created... (3 Replies)
Hi All,
I have a script which is supposed to connect to Windows machine and FTP a file into LINUX.
Script is like below
#!/usr/bin/sh
ParamterFle=${1}
//grepping all parameters
BossFtpLog=${2}
// assigning log file
ftp -i -n host_name << EOF
user1
password1
cd /drive1/drive2
get... (6 Replies)
Hi all
has anyone got a code snippet of how i can ftp a file automatically by running a simple bash script. I have 4 things
IP address xx.xxx.xx.xx
username=satnam
domain = app.sample.ftp
password= satnam_password
Im not sure how to pull these all together to ftp a file?
any ideas? (1 Reply)