6.28. Installing Sh-utils-2.0

Estimated build time:           0.42 SBU
Estimated required disk space:  12 MB

6.28.1. Installation of Sh-utils

This package requires its hostname-patch to be applied before you can install it. Make sure it's unpacked before running the installation commands.

Install Sh-utils by running the following commands:

patch -Np1 -i ../sh-utils-2.0-hostname.patch &&
./configure --prefix=/usr &&
make &&
make install &&
mv /usr/bin/{basename,date,echo,false,pwd} /bin &&
mv /usr/bin/{sleep,stty,su,test,true,uname} /bin &&
mv /usr/bin/chroot /usr/sbin

6.28.2. FHS compliance notes

There is a command installed in this package which is named test. It is often used in shell scripts to evaluate conditions, but is more often encountered in the form of [ condition ]. These brackets are built into the bash interpreter, but the FHS dictates that there should be a [ binary. Create it by running:

ln -s test /bin/[

6.28.3. Command explanations

patch -Np1 -i ../sh-utils-2.0-hostname.patch: This patch suppresses the build of the hostname program which we will be installed later with the net-tools package. The hostname program from the net-tools package is a much better version (and in some cases even required since it supports options that are needed by some programs such as XFree86).

6.28.4. Contents of Sh-utils

Last checked against version 2.0.

6.28.4.2. Descriptions

6.28.5. Sh-utils Installation Dependencies

Last checked against version 2.0.

Autoconf: autoconf, autoheader
Automake: aclocal, automake
Bash: sh
Binutils: ar, as, ld, ranlib
Diffutils: cmp
Fileutils: chmod, chown, install, ls, mv, rm
Gettext: msgfmt, xgettext
Gcc: cc, cc1, collect2, cpp0, gcc
Glibc: getconf
Grep: egrep, fgrep, grep
M4: m4
Make: make
Gawk: gawk
Perl: perl
Sed: sed
Sh-utils: basename, echo, expr, hostname, sleep, uname
Tar: tar
Texinfo: install-info, makeinfo
Textutils: cat, tr