aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/shellutils-inst.xml
blob: 40fa494159c0c47dc7b7174328c87cc18a0de82a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<sect2>
<title>Installation of Sh-utils</title>

<para>Install Shellutils by running the following commands:</para>

<para><screen><userinput>./configure --prefix=/usr &amp;&amp;
make &amp;&amp;
make install &amp;&amp;
cd /usr/bin &amp;&amp;
mv basename date echo false hostname /bin &amp;&amp;
mv pwd sleep stty su test true uname /bin &amp;&amp;
mv chroot ../sbin</userinput></screen></para>

</sect2>

<sect2>
<title>FHS compliance notes</title>

<para>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 <command>[ condition ]</command>. These brackets 
are built into the bash interpreter, but the FHS dictates that there should be a
<filename>[</filename> binary. We create that in this way, while still in the
<filename class="directory">/bin</filename> directory:</para>

<para><screen><userinput>cd /bin &amp;&amp;
ln -sf test [</userinput></screen></para>

</sect2>