Re: wget logging
On Tue, 2002-10-22 at 01:20, Andre Berger wrote:
> * Bijan Soleymani <bijan@psq.com>, 2002-10-21 09:51 -0400:
> > Andre Berger wrote:
> > >* Rob Weir <rweir@softhome.net>, 2002-10-21 09:31 -0400:
> > >>On Mon, Oct 21, 2002 at 09:07:50AM -0400, Andre Berger wrote:
> > >>>Is it possible to see wget's messages on the console, and at the same
> > >>>time log them with "-a"? I haven't been able to figure that one out.
> [...]
> > $ wget -c $MYURL -a | tail logfile
>
> That works. Can I make this a bash alias somehow? Like
>
> alias wget='wget -c $???? -a $HOME/.wget.log | tail $HOME/.wget.log'
>
> where I would have to figure out $????
You can't use aliases like that because there's no variable expansion
done on them. But you can use functions. For example:
wget() {
command wget -c "$@" -a "${HOME}/.wget.log" | tail "${HOME}/.wget.log"
}
--
Claudio Bley ASCII ribbon campaign (")
Debian GNU/Linux advocate - against HTML email X
http://www.cs.uni-magdeburg.de/~bley/ & vCards / \
Reply to: