Hello Adam, First of all sorry for the late response.
On 23/02/2008, Adam D. Barratt <[EMAIL PROTECTED]> wrote: > On Mon, 2008-02-11 at 22:58 -0600, Raphael Geissert wrote: > > > I'm undecided about $SECONDS, given the rationale for not including it > in SUS: "[...]it is not one that would be manipulated frequently enough > by an interactive user to include in the Shell and Utilities volume of > IEEE Std 1003.1-2001." But the thing is that only bash, ksh, and zsh seem to support it so making use of it when parsing the script with posh, dash, and alike will result in unknown behaviours. Additionally it seems like there's not very much consistency on its value. Consider this example: $ bash -c 'echo $SECONDS; sleep 5; echo $SECONDS' 0 5 $ ksh -c 'echo $SECONDS; sleep 5; echo $SECONDS' 0.020 5.058 So it seems like relying on $SECONDS while using the /bin/sh shebang is not safe at all. Please reconsider adding it. > > > > echo 'die!' > /dev/tcp/domain.tld/80 #Debian's bash doesn't support it, > but... > > echo 'die!' > /dev/udp/domain.tld/21 #Debian's bash doesn't support it > neither > > > I'm also not sure whether we should be checking these two. devscripts is > by definition a package for use on Debian and Debian packages so one can > argue checkbnashisms shouldn't be checking things that Debian's shipped > bash packages don't support... Quoting checkbashisms(1): > checkbashisms, based on one of the checks from the lintian system, > performs basic checks on /bin/sh > shell scripts for the possible presence of bashisms. It takes the > names of the shell scripts on the > command line, and outputs warnings if possible bashisms are detected. It doesn't say anything about "only those affecting Debian". The usage of /dev/tcp and /dev/udp is wrong and no script should use them. And the fact that Debian's bash doesn't support them doesn't mean a script under some specific circumstances it tries to use them. > > > Adam > TIA. Cheers, -- Atomo64 - Raphael Please avoid sending me Word, PowerPoint or Excel attachments. See http://www.gnu.org/philosophy/no-word-attachments.html Say NO to Microsoft Office broken standard. See http://www.noooxml.org/petition -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]