Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I use code in some function like

if [ ! -e $DOWNLOADS/$1 ]; then
    echo_run curl -L http://$4/$5/$1 -o $DOWNLOADS/$1

I wonder how to achieve the same thing without curl?

share|improve this question

Dixit man wget:

   -O file
       The documents will not be written to the appropriate files, but all will be concatenated together
       and written to file.  If - is used as file, documents will be printed to standard output,
       disabling link conversion.  (Use ./- to print to a file literally named -.)

       Use of -O is not intended to mean simply "use the name file instead of the one in the URL;"
       rather, it is analogous to shell redirection: wget -O file http://foo is intended to work like
       wget -O - http://foo > file; file will be truncated immediately, and all downloaded content will
       be written there.
share|improve this answer
Just curious, what is the meaning of "dixit"? – jw013 Feb 13 '12 at 6:21
@jw013: in this context, it's roughly "thus says". It's an allusion to "Dixit Algorismi", an early manuscript on arithmetic; i.e. a quote from authorative work. – Ulrich Schwarz Feb 13 '12 at 6:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.