[PATCH 1/2] wget: make default timeout configurable, remove a duplicate line

Laurent Bercot ska-dietlibc at skarnet.org
Mon Oct 21 18:55:14 UTC 2013


>> but even using "$@" whitespace in a URL must be correctly
>> escaped or it will not work with busybox wget and with real wget.
>
> The reason for this is the point when arguments get expanded or
> split into words.

  At this point, a shameless plug feels appropriate.
  The execline language was precisely made for this kind of script:
it spares users the hassle of understanding shell quoting, it does
the right thing in every case ; and for such small scripts, launching
a shell brings non-negligible overhead, whereas launching an execline
script costs practically nothing.

#!/command/execlineb -S0
busybox wget -T xxx $@

does exactly what it looks like it should be doing, even if arguments
contain special characters, and without any unnecessary system call
overhead.
  http://skarnet.org/software/execline/
for the potentially interested readers. Both of them.

-- 
  Laurent



More information about the busybox mailing list