Re: Stupid bash question

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

 



Ralf Corsepius wrote:
: On Tue, 2007-12-11 at 21:29 -0800, Dean S. Messing wrote:
: > Tony Nelson writes:
: > : The reason seems weak to me, but test does not require a closing square
: > : bracket, while [ does, and:
: > : 
: > : At 6:22 PM +0200 5/11/07, Stepan Kasal wrote:
: > : >Hi,
: > : >
: > : >On Fri, May 11, 2007 at 04:44:39PM +0200, Matthias Saou wrote:
: > : >> single square brackets, I thought "[" was a symlink to the
: > : >> coreutils "test" command, [..]
: > : >
: > : >AFAIK, it used to be hard link, not symlink.
: > : >
: > : >> -rwxr-xr-x 1 root root 32168 Apr 17 13:48 /usr/bin/[
: > : >> -rwxr-xr-x 1 root root 29544 Apr 17 13:48 /usr/bin/test
: > : >
: > : >GNU Coding Standards now declare that the behaviour of binary
: > : >should not depend on its name.
: >
: > The new coding standards 
: 
: New? Even version 1.1 of GNU standards (Sun Mar 8 06:28:22 1992 UTC (15
: years, 9 months ago)) carries this rule:
: 
: http://cvs.savannah.gnu.org/viewvc/gnustandards/standards.texi?revision=1.1&root=gnustandards&view=markup
: 
: > put quite a crimp in the use of
: > /sbin/busybox, /sbin/lvm, and a lot of other useful linux modules, I
: > would think.
: > 
: > What's the rationale behind this standard?
: 
: >From [1]
: <cite>
: @node Preface
: @chapter About the GNU Coding Standards
: 
: The GNU Coding Standards were written by Richard Stallman and other GNU
: Project volunteers.  Their purpose is to make the GNU system clean,
: consistent, and easy to install.  This document can also be read as a
: guide to writing portable, robust and reliable programs.  It focuses on
: programs written in C, but many of the rules and principles are useful
: even if you write in another programming language.  The rules often
: state reasons for writing in a certain way.
: </cite>
: 
: >   I've written several
: > useful pieces of signal processing code whose behaviour depends on the
: > name one uses to call it.  Now, self-modifying code---that I can
: > understand. :-)
: 
: >From [1]
: <cite>
: @cindex program name and its behavior
: @cindex behavior, dependent on program's name
: Please don't make the behavior of a utility depend on the name used
: to invoke it.  It is useful sometimes to make a link to a utility
: with a different name, and that should not change what it does.
: 
: Instead, use a run time option or a compilation switch or both
: to select among the alternate behaviors.
: </cite>
: 
: Ralf
: [1] http://cvs.savannah.gnu.org/viewvc/gnustandards/gnustandards/standards.texi
: 

Thanks, Ralf, for enlightening me.  I wrote "new coding standards",
above, in response to Stepan Kasal's remark that "GNU Coding Standards
now declare ...".  I suppose the latter is literally true even if the
Standard was defined in 1992.

Of course, with this new knowledge, I will feel as free as a bird to
boldly ignore the Standard (in this respect) seeing how several other
prominent linux executables (busybox, lvm, dump/restore, halt, to name
a few) have been blithely ignoring it for more than a decade.  ½:-)

Dean


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux