bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] 'or' and flexible expression of wget options


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] 'or' and flexible expression of wget options
Date: Mon, 08 Aug 2011 14:51:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Peng,

GNU find has to follow POSIX specifications, while wget has not.  IMHO,
the best way to expand wget to do such cool things is to support GNU
guile to evaluate expressions, or executing an external process.

Cheers,
Giuseppe



Peng Yu <address@hidden> writes:

> Hi,
>
> It seems that all the options checked in download_child_p() are
> AND'ed. In gnu find, options can be and'ed or or'ed much more
> flexibly. I looked at wget source, it is not clear to me that flexible
> expression can be supported by the current wget cmdline option parsing
> framework.
>
> Does anybody know anything about how find does this and if wget can
> adapt the techniques in find to support flexible options?
>
> From man find:
>   OPERATORS
>        Listed in order of decreasing precedence:
>
>        ( expr )
>               Force  precedence.   Since parentheses are special to
> the shell, you will normally need to quote them.  Many of the examples
>               in this manual page use backslashes for this purpose:
> `\(...\)' instead of `(...)'.
>
>        ! expr True if expr is false.  This character will also usually
> need protection from interpretation by the shell.
>
>        -not expr
>               Same as ! expr, but not POSIX compliant.
>
>        expr1 expr2
>               Two expressions in a row are taken to be joined with an
> implied "and"; expr2 is not evaluated if expr1 is false.
>
>        expr1 -a expr2
>               Same as expr1 expr2.
>
>        expr1 -and expr2
>               Same as expr1 expr2, but not POSIX compliant.
>
>        expr1 -o expr2
>               Or; expr2 is not evaluated if expr1 is true.
>
>        expr1 -or expr2
>               Same as expr1 -o expr2, but not POSIX compliant.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]