★ wanayoo — archive 1999 http://www.linux-2000.org/tips/howto_tip.htmlNouvelle recherche | Portail wanayoo


















Click here to go to the Linux2000 homepage.

Linux Tips!
Script to view those compressed HOWTO's
Submitted by Didier Juges dj@des-tin.nfds.net

Here is a short script that eases looking for and viewing howto documents. My howto's are in /usr/doc/HOWTO/ and are gzipped. The file names are XXX-HOWTO.gz, XXX being the subject. I created the following script called "howto" in the /usr/local/sbin directory:
______________________________________________________________________

#!/bin/sh
if [ "$1" = "" ]; then
   ls /usr/doc/HOWTO | less
else
   gunzip -c /usr/doc/HOWTO/$1-HOWTO.gz | less
fi

______________________________________________________________________

Lets make it an executable.
Do: chmod 755 howto

When called without argument, it displays a directory of the available howto's. Then when entered with the first part of the file name (before the hyphen) as an argument, it unzips (keeping the original intact) then displays the document.

For instance, to view the Serial-HOWTO.gz document, enter:

$ howto Serial


hosting by blueznet.com design © 1998-99 by L2K Designs