Prev: ulimit question
Next: log generation
From: laxman on 26 Jul 2010 03:19 Dear All, Please send me a script for the below purpose " moving files from current location to ftp" and need to generate a mail or log if files are not moving. Please send me as soon as possible it is very urgent for me. Regards, lakshmanrao
From: Janis Papanagnou on 26 Jul 2010 05:05 laxman schrieb: > Dear All, > > > Please send me a script for the below purpose " moving files from > current location to ftp" and need to generate a mail or log if files > are not moving. > > Please send me as soon as possible it is very urgent for me. Your impudence is priceless. > > > Regards, > lakshmanrao
From: Loki Harfagr on 26 Jul 2010 06:33 Mon, 26 Jul 2010 00:19:40 -0700, laxman did cat : > Dear All, > > > Please send me a script for the below purpose " moving files from > current location to ftp" and need to generate a mail or log if files are > not moving. > > Please send me as soon as possible it is very urgent for me. > > > Regards, > lakshmanrao though this question should have been posted in Spetember, not in July heres's your script as you mentioned it was urgent, be sure it'll be treated a real emergency then on. ----- #!/bin/sh cd find . -type f -print0|xargs -t -0 -I wot mv wot ftp 2>/tmp/errlog ----- the eventual errors will be listed in the log file /tmp/errlog Have a nice September.
From: thdyoung on 26 Jul 2010 06:35 Speaking as someone who wants to learn, it would be v interesting to see how such a script might work, notwithstanding the pricelss gall of the OP I have been thinking in outline about a script wh allows me to do the following: - draft a letter on my local machine - save it as pdf to a folder w a Applescript action attached - AS runs a shell script that surveils the directory for new files and "puts" them into the right directory on my host using ftp The shell script wld also insert the new file url into a new row in a mysql table. I have never been able to log into my host's mysql via command line. I don't know why. I can ftp it alright. Anyway, I don't think this script wld be that difficult. I guess to avoid duplication the shell script wld nd to delete the pdf file after uploading. Tom
From: Ben Bacarisse on 26 Jul 2010 10:20
Loki Harfagr <l0k1(a)thedarkdesign.free.fr.INVALID> writes: > Mon, 26 Jul 2010 00:19:40 -0700, laxman did cat : >> Please send me a script for the below purpose " moving files from >> current location to ftp" and need to generate a mail or log if files are >> not moving. >> >> Please send me as soon as possible it is very urgent for me. <snip> > though this question should have been posted in Spetember, not in July > heres's your script as you mentioned it was urgent, be sure it'll be > treated a real emergency then on. > ----- > #!/bin/sh > cd > find . -type f -print0|xargs -t -0 -I wot mv wot ftp 2>/tmp/errlog > ----- Is this reply justified? I'm not sure. To the OP: don't run this unless you want to learn, the hard way, not to run scripts you don't understand. -- Ben. |