Those batch files are little more than wrappers around commonly used command
line options. As a matter of fact I posted them there more to illustrate
commonly used options than else.
The wrapper just tries to make sure you won't use the same logfile from two
different processes, and load a cookie file if present. And it does record
the invocation.
Fast conversion to bash of getfilelong.cmd to getfilelong.sh:
#!/bin/bash
echo $* >>url2get.txt
if [ -f i-am-running.txt ] ; then
echo Some wget process already running here ?
else
date >i-am-running.txt
if [ -f cookies.txt ] ; then
cookies="--load-cookie=cookies.txt"
else
cookies=""
fi
if [ "$1" eq "-v" ] ; then
shift;
log="-a wget.log"
else
log=""
fi
wget -v -e "recursive = off" \
%log% %cook% --save-cookies=cookies.txt \
$*
rm i-am-running.txt
fi
There. Untested. Implementation of better features feasable with bash or
similar left as exercise for the reader - at least getopts comes to mind,
also a better locking scheme which doesn't leave a blocking lock behind if
the process is killed
(i-am-running.txt-is-a-ugly-hack-how-can-we-do-it-better-on-braindead-windoz
e-shell?).
Heiko
--
-- PREVINET S.p.A. www.previnet.it
-- Heiko Herold [EMAIL PROTECTED]
-- +39-0422-5907073 ph
-- +39-0422-5907472 fax
> -Original Message-
> From: Earl Mitchell [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 01, 2003 6:43 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Where should I put the .wgetrc on windows
>
>
> This page has zipped file with common commands
> (i.e. DOS shell scripts). Has anybody converted
> these to bash scripts?
>
> -earlm
>
> Fred Holmes wrote:
>
> > http://space.tin.it/computer/hherold/
> >
> > Go to "Mini HOWTO quick start:" on the page and read the
> instructions
> > there.
> >
> > Fred Holmes
> >
> >
> > At 12:14 AM 3/31/2003, lameon wrote:
> >
> >> I'm using windows NT/2000/XP, and where should I put the
> .wgetrc file.
> >> Thanks!
> >>
> >
> >
>
>