[ale] Question about ftp'ing files
Pete Hardie
pete.hardie at gmail.com
Thu Jan 17 07:26:51 EST 2013
I think that your awk script will only print the last field of the
last line- remove the "END" pattern and just do "{print $NF}"
Pete Hardie
--------
Better Living Through Bitmaps
On Thu, Jan 17, 2013 at 6:47 AM, Steve Tynor <stevejunk at iintiip.com> wrote:
> Consider using "sitecopy" (http://www.manyfish.co.uk/**sitecopy<http://www.manyfish.co.uk/sitecopy>)
> - I use it to keep various websites in sync w/ a local source tree. Think
> of it as a rsync-like utility built on top of ftp. Google shows Ubuntu and
> Fedora packages available for normal installs.
>
> Steve
>
>
>
> On 1/16/2013 10:37 PM, Chuck Payne wrote:
>
>> Guys,
>>
>> I have a question, I have a very simple ftp script
>>
>> -----------------Script Begins------------------------**----
>>
>> #!/bin/bash
>> # To find the latest files and upload them to process server
>>
>> FILE=$(ls -rt /chroot/home/fl/fl_sdirc | awk 'END{ print $NF }')
>> ftp -n 192.168.0.8 <<+
>> user user password
>> binary
>> put $FILE
>> quit
>>
>> ------------------Script Ends--------------------------**-------------
>>
>> But, I think my script is limited and might not have a way to check if
>> files have been uploaded and might not get all the
>>
>> This line seems to only return one file
>>
>> ls -rt /chroot/home/fl/fl_sdirc | awk 'END{ print $NF }'
>>
>> I did this as a test, I ran the following command
>>
>> touch touch1
>> touch touch2
>> touch touch3
>>
>> but only returns touch3, not touch1, touch2 where only seconds part.
>> If that the case, my script will miss uploading files. Is there a
>> better way of doing this? I know there is. just I'm bit brain dead
>> trying think of a good way. I could set up a log and move files, but
>> that will break my KISS rule, or do I need that to make it work.
>>
>>
> ______________________________**_________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/**listinfo/ale<http://mail.ale.org/mailman/listinfo/ale>
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/**listinfo<http://mail.ale.org/mailman/listinfo>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20130117/c198b1a7/attachment.html>
More information about the Ale
mailing list