Code [could be prettier but works] (save to file, point to wherever perl is and make executable:fruitcakeFebruary 8 2009, 18:28:07 UTC
#!/usr/bin/perl -w
# This script is intended to fetch a particular file from a location on the web and # place it in a local directory. # A list of the file locations can be kept in a local file either specified from the # commandline or in '/home//.filefetch', one url per line, example format: # url extention destination # http://127.0.0.1/dreamgirlonhand .csv /tmp
# To install cpan on a unix commandline run: # perl -MCPAN -e 'install Bundle::MCPAN' # To install used cpan packages listed below: # perl -MCPAN -e 'install File::Fetch' # perl -MCPAN -e 'install Date::Calc' # perl -MCPAN -e 'install Getopt::Long' # and follow instructions on the screen
Re: example.filefetch (which is tries of you don't give a --config="" optionmadderzFebruary 12 2009, 20:58:40 UTC
Sorry about that, but in any event I'd like to have a go at getting it working myself, that way I'll have more chance of understanding how it does what it does. :)
I also wasn't expecting to get something that looks so complete so quickly, the best I was hoping for was a link to an instructional page so I've been caught a bit unprepared.
Comments 9
Reply
Reply
#!/usr/bin/perl -w
# This script is intended to fetch a particular file from a location on the web and
# place it in a local directory.
# A list of the file locations can be kept in a local file either specified from the
# commandline or in '/home//.filefetch', one url per line, example format:
# url extention destination
# http://127.0.0.1/dreamgirlonhand .csv /tmp
# To install cpan on a unix commandline run:
# perl -MCPAN -e 'install Bundle::MCPAN'
# To install used cpan packages listed below:
# perl -MCPAN -e 'install File::Fetch'
# perl -MCPAN -e 'install Date::Calc'
# perl -MCPAN -e 'install Getopt::Long'
# and follow instructions on the screen
# Usage: ./file_fetch # ./file_fetch --config="urlfile ( ... )
Reply
http://127.0.0.1/dreamgirlonhand2 csv /tmp
http://127.0.0.1/dreamgirlonhand3 csv /tmp
Reply
Reply
Reply
I also wasn't expecting to get something that looks so complete so quickly, the best I was hoping for was a link to an instructional page so I've been caught a bit unprepared.
You are awesome and I owe you some drinks!
Reply
Leave a comment