#!/bin/perl
#
# url_get: script to obtain documents given their URL (Universal Resource
#          Locator) and write them to stdout
#
# syntax: url_get [-bdh] <url>
#
# where -b means binary transfer when doing ftp transactions,
#       -h means keep the MIME header in HTTP 1.0 transactions (url_get
#          strips this by default). Header & data go to stdout.
#       -d means "debug" mode on HTTP transfers (HTTP MIME header goes
#          to stderr, body of document goes to stdout)
########################################################################

require "url_get.pl";
require "getopts.pl";
&Getopts(':bdh');

die "Usage: url_get [-bdh] <url> ...\n" unless $#ARGV >= 0;
$timeout = undef;

foreach $url (@ARGV) {
    &url_get($url, "&STDOUT");
}

__END__
