Re: Stupid bash question

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

 



Joe Smith wrote:
Tony Nelson wrote:
 > The reason seems weak to me, but test does not require a closing
 > square bracket, while [ does, and:
 > ...
 >> GNU Coding Standards now declare that the behaviour of binary
 >> should not depend on its name.

 From http://www.gnu.org/prep/standards/html_node/User-Interfaces.html:
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.

Sounds more like a request than a declaration ;-)

I wish they had provided some rationale, seeing as how the practice has a long history on Unix, and I (at least) have not run into any situation where it caused a problem.

And there are good reasons for it. /bin/[ vs. /bin/test are probably extremely rarely used since the shell built-in takes precedence unless you specify the path explictly, but cp/ln/mv traditionally were hard links, saving not only disk space but loading time and RAM when they are mapped from the same inode.

--
  Les Mikesell
   lesmikesell@xxxxxxxxx

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux