[mythtv-users] Zap2It channel list didn't get channel names

Greg Stark gsstark at mit.edu
Fri Apr 7 06:27:05 UTC 2006


Isaac Richards <ijr at case.edu> writes:

> What version of wget?  The man page for mine (1.10.2) says that that is 
> allowed:
> 
>     You may freely mix different option styles, or specify options after the 
> command-line arguments.  Thus you may write:
> 
>     wget -r --tries=10 http://fly.srk.fer.hr/ -o log

Hm, well that's either a doc bug or a coding bug. GNU getopt does do this kind
of dwim reordering however it disables it if POSIXLY_CORRECT is set.

For a copy of GNU getopt that's included in the system libraries that's useful
since it means you can run scripts designed to run a POSIX system and it also
prevents you from accidentally introducing non-portable syntax.

However wget includes an internal copy of GNU getopt. In that case it would be
reasonable for wget to rip out this feature so that the behaviour always
matches the documentation.

As it is currently the documentation is incorrect. If you set POSIXLY_CORRECT
you cannot write commands as shown here.

I set POSIXLY_CORRECT to avoid accidentally writing non-standard code like
this in scripts. Without setting POSIXLY_CORRECT This kind of syntax would
work on Linux even for standard commands like ls but then would fail if the
same script were run on a non-glibc system.


-- 
greg



More information about the mythtv-users mailing list