Changeset 3891001


Ignore:
Timestamp:
02/26/2005 08:59:08 PM (19 years ago)
Author:
Randy McMurchy <randy@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
38b41c2
Parents:
ae7f265
Message:

Added indexing tags to the which instructions

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3501 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/sysutils/which.xml

    rae7f265 r3891001  
    2020<?dbhtml filename="which.html"?>
    2121<title><application>which</application>-&which-version; and alternatives</title>
     22<indexterm zone="which">
     23<primary sortas="a-Which">Which</primary></indexterm>
    2224
    23 <para>The presence or absence of the which program in the main
    24 <acronym>LFS</acronym> book is probably one of the most contentious issues on
    25 the mailing lists.  It has resulted in at least one flame war in the past.
    26 To hopefully put an end to this once and for all, presented here are two
    27 options for equipping your system with "which". The question of which "which"
    28 is for you to decide.</para>
     25<para>The presence or absence of the <command>which</command> program in the
     26main <acronym>LFS</acronym> book is probably one of the most contentious
     27issues on the mailing lists. It has resulted in at least one flame war in the
     28past. To hopefully put an end to this once and for all, presented here are two
     29options for equipping your system with <command>which</command>. The question
     30of which <quote><command>which</command></quote> is for you to decide.</para>
    2931
    3032<para>The first option is to install the actual <acronym>GNU</acronym> program
     
    5759
    5860<screen><userinput><command>./configure --prefix=/usr &amp;&amp;
    59 make &amp;&amp;
    60 make install</command></userinput></screen>
     61make</command></userinput></screen>
     62
     63<para>Now, as the root user:</para>
     64
     65<screen><userinput role='root'><command>make install</command></userinput></screen>
    6166
    6267</sect2>
     
    6570<title>Contents</title>
    6671
    67 <para>The <application>which</application> package contains
    68 <command>which</command>.</para>
     72<segmentedlist>
     73<segtitle>Installed Program</segtitle>
     74<segtitle>Installed Libraries</segtitle>
     75<segtitle>Installed Directories</segtitle>
    6976
    70 </sect2>
     77<seglistitem>
     78<seg>which</seg>
     79<seg>None</seg>
     80<seg>None</seg>
     81</seglistitem>
     82</segmentedlist>
    7183
    72 <sect2><title>Description</title>
     84<variablelist>
     85<bridgehead renderas="sect3">Short Descriptions</bridgehead>
     86<?dbfo list-presentation="list"?>
    7387
    74 <sect3><title>which</title>
    75 <para><command>which</command> shows the full path of (shell) commands.</para>
    76 </sect3>
     88<varlistentry id="which-prog">
     89<term><command>which</command></term>
     90<listitem><para>shows the full path of (shell) commands installed in your
     91<envar>PATH</envar>.</para>
     92<indexterm zone="which which-prog">
     93<primary sortas="b-which">which</primary>
     94</indexterm></listitem>
     95</varlistentry>
     96</variablelist>
    7797
    7898</sect2>
     
    81101<title>The 'which' script</title>
    82102<para>The second option (for those who don't want to install the program)
    83 is to create a simple script:</para>
    84 <screen><userinput><command>cat &gt; /usr/bin/which &lt;&lt; "EOF"</command>
     103is to create a simple script (execute as the root user):</para>
     104
     105<screen><userinput role='root'><command>cat &gt; /usr/bin/which &lt;&lt; "EOF"</command>
    85106#!/bin/bash
    86107type -pa "$@" | head -n 1 ; exit ${PIPESTATUS[0]}
     
    88109chmod 755 /usr/bin/which
    89110chown root:root /usr/bin/which</command></userinput></screen>
     111
    90112<para>This should work OK and is probably the easiest solution
    91113for most cases, but is not the most comprehensive implementation.</para>
Note: See TracChangeset for help on using the changeset viewer.