587 lines
23 KiB
HTML
587 lines
23 KiB
HTML
<!--startcut ======================================================= -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<html>
|
|
<head>
|
|
<META NAME="generator" CONTENT="lgazmail v1.1H.i">
|
|
<TITLE>The Answer Guy 37: Unable to Open Console: After "Custom" Install</TITLE>
|
|
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
|
|
LINK="#3366FF" VLINK="#A000A0">
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<H4>"The Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>
|
|
<P> <hr> <P>
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<center>
|
|
<H1><A NAME="answer">
|
|
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
|
|
border="0" align="middle">
|
|
<font color="#B03060">The Answer Guy</font>
|
|
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
|
|
border="0" align="middle">
|
|
</A></H1>
|
|
<BR>
|
|
<H4>By James T. Dennis,
|
|
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
|
|
Starshine Technical Services,
|
|
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
|
|
</H4>
|
|
</center>
|
|
|
|
<p><hr><p>
|
|
<!-- endcut ======================================================= -->
|
|
<!-- begin 44 -->
|
|
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
|
|
height="50" width="60" alt="(?) " border="0"
|
|
>Unable to Open Console: After "Custom" Install</H3>
|
|
<H4 align="center">
|
|
... And a number of power RPM tricks!
|
|
</H4>
|
|
|
|
<p><strong>From Mark F. Johnson on Wed, 27 Jan 1999
|
|
</strong></p>
|
|
<!-- ::
|
|
Unable to Open Console: After <A HREF="http://www.redhat.com/">Red Hat</A> "Custom" Install
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
:: -->
|
|
<P><STRONG>
|
|
Greetings Once Again Honorable Guru,
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
My newly acquired, but soon to be short-lived, reputation as a Linux sage is
|
|
in danger. I have been helping my friend set up Linux on his PC at home. He
|
|
was the one who waged the Winmodem battle I told you about. He is attempting
|
|
to duplicate my success at dual-booting Windows98 and Linux (RedHat 5.2).
|
|
When he uses the workstation install mode, everything works fine. But when
|
|
we attempt a custom install, which I have done successfully numerous times,
|
|
the install goes fine until the first reboot. Then the boot sequence stops
|
|
after checking his partitions, with a message that reads "Unable to open a
|
|
console". We have done everything identically to the method I used on my
|
|
PC, which is a near duplicate of his PC. We have removed all the partitions
|
|
and OS's, including Windows, repartitioned and reformatted the drive,
|
|
verified that the available space equalled the size of the drive, and
|
|
reinstalled Windows and then Linux. Still, no joy. Same message. During the
|
|
custom install, we created a 300MB root directory, a 127MB swap file (he has
|
|
128MB RAM), and three 600MB (growable) directories (<tt>/usr</tt>,
|
|
<TT>/home</TT>, and <TT>/opt).</TT>
|
|
As I said, everything formatted and installed without a hitch until reboot.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
I have searched the past Linux Gazettes for an answer to this problem, but I
|
|
came up dry. Any help would be appreciated.
|
|
</STRONG></P>
|
|
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
Unable to open console after reboot suggests a problem in
|
|
your <TT>/dev</TT> directory tree. If the <tt>tty1</tt> and other "virtual
|
|
terminal" device nodes are inaccessible (you tried to put
|
|
<TT>/dev</TT> as a symlink to some mounted filesystem or something
|
|
like that) then I'd expect this error message.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
You can get similar problems (error messages regarding
|
|
utmp or wtmp files) if your <TT>/var/log</TT> doesn't get
|
|
mounted --- or doesn't exist.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
So, it could be some problem with the way you're structuring
|
|
your filesystems. Boot from a rescue floppy and look
|
|
around. Make sure that the <TT>/dev</TT> directory is on your
|
|
root filesystem and that the <TT>/dev/tty[0-2]*</TT> devices nodes
|
|
are there, and that the are proper character devices. An
|
|
'<tt>ls -al</tt>' should look a bit like:
|
|
</BLOCKQUOTE>
|
|
|
|
<blockquote><pre>crw-rw---- 1 jimd users 4, 0 Jul 26 1998 /dev/tty0
|
|
crw--w---- 1 jimd tty 4, 1 Jan 26 22:23 /dev/tty1
|
|
crw------- 1 root root 4, 10 Jan 7 17:41 /dev/tty10
|
|
crw--w---- 1 root tty 4, 11 Jan 24 18:18 /dev/tty11
|
|
crw--w---- 1 root tty 4, 12 Jan 25 05:42 /dev/tty12
|
|
crw-rw---- 1 jimd users 4, 13 Jul 26 1998 /dev/tty13
|
|
crw-rw---- 1 jimd users 4, 14 Oct 3 02:28 /dev/tty14
|
|
crw-rw---- 1 root tty 4, 15 Jul 26 1998 /dev/tty15
|
|
crw-rw---- 1 root tty 4, 16 Jul 26 1998 /dev/tty16
|
|
crw-rw---- 1 root tty 4, 17 Jul 26 1998 /dev/tty17
|
|
crw-rw---- 1 root tty 4, 18 Jul 26 1998 /dev/tty18
|
|
crw-rw---- 1 root tty 4, 19 Jul 26 1998 /dev/tty19
|
|
crw--w---- 1 jimd tty 4, 2 Jan 24 16:16 /dev/tty2
|
|
crw-rw---- 1 root tty 4, 20 Jul 26 1998 /dev/tty20
|
|
crw-rw---- 1 root tty 4, 21 Jul 26 1998 /dev/tty21
|
|
crw-rw---- 1 root tty 4, 22 Jul 26 1998 /dev/tty22
|
|
crw-rw---- 1 root tty 4, 23 Jul 26 1998 /dev/tty23
|
|
crw-rw---- 1 root tty 4, 24 Jan 26 22:44 /dev/tty24
|
|
crw--w---- 1 jimd tty 4, 3 Jan 23 09:09 /dev/tty3
|
|
crw------- 1 root root 4, 4 Jan 7 17:41 /dev/tty4
|
|
crw------- 1 root root 4, 5 Jan 7 17:41 /dev/tty5
|
|
crw------- 1 root root 4, 6 Jan 7 17:41 /dev/tty6
|
|
crw------- 1 root root 4, 7 Jan 7 17:41 /dev/tty7
|
|
crw------- 1 root root 4, 8 Jan 7 17:41 /dev/tty8
|
|
crw------- 1 root root 4, 9 Jan 7 17:41 /dev/tty9
|
|
</pre></blockquote>
|
|
<BLOCKQUOTE>
|
|
... note that I define 24 of these ttys --- that's because
|
|
I use twelve of them for logins and my X sessions (sometimes
|
|
up to three of them) are on the next few, a copy of
|
|
all 'syslogd' messages is on number 24, and I use the others
|
|
with the 'open' command, or as target for redirecting
|
|
'tail -f' output and other logging operations. So I use
|
|
<EM>alot</EM> more ttys than most people.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
Now, the odd thing is that this is happening right after a
|
|
fresh install. I almost always used custom (one of these
|
|
days I'll learn to use Red Hat's "KickStart" package ---
|
|
though every installation I do is different so it probably
|
|
wouldn't help much).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
So, I'd have to guess that somewhere you're forcing Red Hat
|
|
to skip the installation of some vital package. It's
|
|
hard to imagine how you're doing that. The only time I've
|
|
come close to that problem is when I was experimenting with
|
|
installing over FTP from a public Internet FTP site (that
|
|
was very unreliable in Red Hat 5.2).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
The obvious workaround is to install using their
|
|
"workstation" profile and then to use the 'rpm' command to
|
|
add and remove the packages to your taste after the
|
|
intallation is complete and you've successfully rebooted.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
One way to get a full list of packages that you hvae
|
|
installed on a Red Hat (or other RPM based) system is
|
|
to use the command:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
rpm -aq
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... which you can redirect to a file, of course.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
If just the package names aren't enough, you can use
|
|
a command like:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
rpm -aqi
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... to get a full list of packages with short (one screen
|
|
full) describtion and some info about each.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
So, you could create a package list using:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
rpm -aq > <TT>/tmp/plist</TT>
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... then edit that to delete the names of all the packages
|
|
you want to keep. You can refer to individual rpm -qi
|
|
screens for packages that you don't recognize by name
|
|
by simply issuing commands like:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
rpm -qi zircon-1.17-16
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... (where zircon was a package name I picked at random).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
(If you wanted to be clever you'd make a macro in your
|
|
favorite editor to pull in the description of any package
|
|
on which your cursor was sitting when you invoked it.
|
|
In '<tt>vi</tt>' that would be something like:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BlockQuote><code>
|
|
:map S mcyypI:r!rpm -qi ^[o^[k"<A HREF="mailto:cD@c"
|
|
>cD@c</A>^M^[`c
|
|
</code></BlockQuote></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... (where S is just any key that you don't use much
|
|
in 'vi' command mode. This macro sets mark 'c' and
|
|
fills paste register 'c'. All of the <tt>^[</tt> are
|
|
literal escapes and the one <tt>^M</tt> is a literal carriage
|
|
return; those are entered in 'vi' by preceding them
|
|
with a ^v [Ctrl-V]).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
So, using this macro you'd move your cursor over any package
|
|
that you were wondering about, hit [S] (from command mode)
|
|
and this macro would extract the "info" by "querying" the
|
|
RPM database and insert the results into your editing
|
|
buffer.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
Once you've removed all the package names that you want
|
|
to keep you could use a command like:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
cat <TT>/tmp/delete.list</TT> | xargs rpm -e
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... to try "erasing" (un-installing) everything on
|
|
the list. Here I'm assuming you make a copy of your
|
|
package list file to "delete.list" and edited that.
|
|
Obviously you can use any filenames you like.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
This might result in a list of error messages about
|
|
how some packages could not be removed due to dependencies
|
|
with other packages. There should be no harm done ---
|
|
so this command isn't as dangerous as it might look.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
After you've removed all the packages you don't want
|
|
you can select various packages that you do want to add
|
|
and simply use the '<tt>rpm -i</tt>' command to install each of
|
|
them.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
This would be most easily done in a shell (rather than
|
|
through an editor list). To save on typing I'd
|
|
probably create a couple of shell aliases like 'q' and 'i'
|
|
to query and install packages. Those would look like:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BlockQuote><code>
|
|
alias q='rpm -qp '
|
|
<br>alias i='rpm -i '
|
|
</code></BlockQuote></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
Of course looking through a list of almost 600 packages
|
|
one could get boring. You could narrow the list a bit
|
|
by generating a list of the package names on the CD and
|
|
comparing that to the packages listed in your database.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
To do that can use something a bit like:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BlockQuote><code>
|
|
rpm -qp > /tmp/pkg.list
|
|
rpm -aq >> /tmp/pkg.list
|
|
sort /tmp/pkg.list | uniq
|
|
</code></BlockQuote></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... since any package that is installed will be listed
|
|
twice (once from the -qp listing and once from the
|
|
-aq listing) the 'sort | uniq' step will leave you with
|
|
a list of packages that are <EM>NOT</EM> installed. Note:
|
|
This trick only works since you have just installed
|
|
all the RPMs from this CD. If you had fetched and
|
|
installed some RPMs from a different CD or from an
|
|
FTP site then you'd have to use a different approach
|
|
to weed out the "extras"
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE> <BLOCKQUOTE> <CODE>
|
|
rpm -qa | sort > /tmp/pkg.inst
|
|
rpm -qp | sort > /tmp/pkg.dir
|
|
comm -23 /tmp/pkg.dir /tmp/pkg.inst > /tmp/pkg.not
|
|
</CODE> </BLOCKQUOTE> </BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... this is a better technique overall. The 'comm'
|
|
command finds lines "in common" between two files.
|
|
It normally prints three columns of output --- but
|
|
we just want the first column (the names of packages
|
|
in the "dir" that are <EM>not</EM> in the list of "inst"-alled
|
|
packages).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
Incidentally using the command
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
comm -13 /tmp/pkg.dir /tmp/pkg.inst > /tmp/pkg.not
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... or swapping the names of the files should give us
|
|
a list of all "3rd party" packages that we've installed.
|
|
That is that it results in a list of files that are
|
|
installed and for which there is no ".rpm" file in the
|
|
directory listing. Obviously the fact that Red Hat stores
|
|
all of its package files in a single directory on its CDs
|
|
is pretty convenient here. However, even when we're using
|
|
<A HREF="http://www.suse.com/">S.u.S.E.</A> CDs (with
|
|
several CDs to a set and RPMs scattered
|
|
in number groupings) we can easily generate a single listing
|
|
of all the packages from as many directories as we like.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
(You can then print a list of those, or you could be
|
|
even more clever, make a <TT>/tmp/pkglist/</TT> directory and
|
|
create a series of symlinks for each of the "not installed"
|
|
package). Here's a command that will do that:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><pre>
|
|
cat /tmp/not.installed.txt | while read i; do
|
|
ln -s <TT>/mnt/cdrom/RedHat/RPMS/$i</TT> .
|
|
done
|
|
</pre></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... (execute this command from your tmp/pkglist directory!).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
No you can focus on these packages --- issuing your 'q'
|
|
and 'i' commands. Or you could just use the 'q' alias to
|
|
read more about each package --- and remove the symlinks for
|
|
each that you don't want to install. Then, when you're done
|
|
you could just issue a command like:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
rpm -i *.rpm
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... to install every package that's still listed in your
|
|
temporary link farm.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
Of course I've mentioned a number of other 'rpm' command
|
|
tricks in previous issues. However, to save you the time
|
|
searching through the back issues of LG I'll recap a
|
|
couple of them here:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
"Verify" all the installed packages:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
rpm -Va
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... this produces a list of any file from any package
|
|
that is "missing" or has changed (checking MD5 checksums,
|
|
time stamps, ownership and permissions, etc). Unfortunately
|
|
the output doesn't list the names of the packages from which
|
|
these files came. You can get that by using:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
rpm -qf $FILENAME
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
(for any of the files that were listed as modified or
|
|
"missing" --- or for any file that was installed by any RPM
|
|
on your system, for that matter).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
The <tt>-qf</tt> option associates a file with the package that
|
|
"owns" it.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
This "Verify" compares your files to the installed
|
|
RPM database. It's possible to keep back copies of your
|
|
RPM database on removable media (though they will typically
|
|
be too large to fit on a floppy, even compressed in most
|
|
of my cases). You can use the '--dbpath' option to force
|
|
the 'rpm' command to use a database in some other location
|
|
(such as <TT>/mnt/ls120/backup</TT> or <TT>/mnt/zipdisk/rpmdb.bak/).</TT>
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
Another trick is to verify a package installation against
|
|
the contents of a package file. To do this you use the
|
|
command:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
rpm -Vp $PACKAGE_FILENAME
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... in a previous column I gave a script that would
|
|
verify <EM>any</EM> of your installed packages against any
|
|
RPM in the current directory. However, it occurs to
|
|
me that this script was probably unnecessarily complex
|
|
--- I could use the 'comm' command to simplify it somewhat.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
In this case we'd generate our to lists of packages as
|
|
before. We also build an "index" of the packages (matching
|
|
the package names to the filenames) using a command like:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><pre>
|
|
ls *.rpm | while read f; do
|
|
echo $(rpm -qp $f) $f
|
|
done > /tmp/pkg.index
|
|
</pre></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
Then we'd use a command like:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
comm -12 /tmp/pkg.dir /tmp/pkg.inst \
|
|
<br>| join - <TT>/tmp/pkg.index</TT> | cut -f 2 -d" " | xargs rpm -Vp
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... this may not look simpler --- but it is much more
|
|
elegant than the last version of this script that I posted.
|
|
(I often forget about 'comm' and 'join' --- and I
|
|
shouldn't). The 'comm' command in this case is just
|
|
listing the packages in common (between our installed
|
|
list and our directory listing). The 'join' command finds
|
|
those lines in our index file that correspond to any of the
|
|
package names we've listed (remember, package names and
|
|
package <EM>FILE</EM> names don't have to match). The '<tt>cut</tt>' command
|
|
then simply "cuts" the filename from each line (that's
|
|
"field" number two with a "delimiter" of a space; I could
|
|
have used <tt>-e</tt> and "<tt>\t</tt>" on my echo command when I was building
|
|
the "index" file to build it with 'cut's default delimiter
|
|
--- though it makes no difference). Finally we pass the
|
|
list of package file names to '<tt>xargs</tt>' which builds a series
|
|
of one or more '<tt>rpm -Vp</tt>' commands by translating the
|
|
arguments from its standard input into lists of arguments on
|
|
the command lines it executes.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
If we consolidate the code samples into a full script
|
|
it would total about a dozen lines or less. (I think that's
|
|
half of what it took in my previous example).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
I've used a number of techniques like these to manage the
|
|
large numbers of packages that I have installed on some of my
|
|
systems. I use 'sh' (actually 'bash') enough and on enough
|
|
different systems that I don't even keep most of these
|
|
scripts --- it's usually easier to just type them on the fly
|
|
then it is to remember where I have them and go fetch them.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
I think I'll put this one together and forward it to the
|
|
Red Hat team, to the maintainer of the Linux-Tips HOWTO,
|
|
and maybe post it on my website.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
(It would be nice if someone generated a list of
|
|
comparable '<tt>dpkg</tt>' commands --- since I don't have the
|
|
experience with <A HREF="http://www.debian.org/">Debian</A>,
|
|
and I'd like to learn more about it).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
More importantly I hope I've given some nice examples of
|
|
shell scripting --- ways to use commands like '<tt>uniq</tt>',
|
|
'<tt>comm</tt>', '<tt>join</tt>', '<tt>cut</tt>', '<tt>xargs</tt>'
|
|
and those ubiquitous '<tt>while read</tt>' loops that show up in
|
|
so many of my scripts.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
(Actually I should note that my use of <TT>/tmp</TT> for
|
|
all of this is atrocious --- since anyone using this in
|
|
a script on a multi-user system would be vulnerable to
|
|
horrible symlink attacks. Usually I use ~/tmp for all
|
|
of these sorts of things).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
It turns out that I've been asked to teach shell programming
|
|
at a local community college. I've never done any
|
|
professional teaching before --- and only recently did my
|
|
first public lecture. It's kind of exciting for a guy with
|
|
no college degree himself.
|
|
</BLOCKQUOTE>
|
|
<P><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
Regards,
|
|
Mark
|
|
</STRONG></P>
|
|
<P><STRONG><DL><DT>
|
|
P.S. If you have the time, here's a little mind bender. Check it out.
|
|
<DD><A HREF="http://www3.mcps.k12.md.us/users/rsfay/magic/index.html"
|
|
>http://www3.mcps.k12.md.us/users/rsfay/magic/index.html</A>
|
|
</DL></STRONG></P>
|
|
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
I'm working from my text terminal in the living room
|
|
tonight --- so I couldn't view this site's content (it
|
|
doesn't come across in '<tt>lynx</tt>'). I often use one of the
|
|
terminals in the living room while I'm watching TV, or
|
|
when I have friends over. One of my friends decided to
|
|
drop by and do some programming on his laptop, and
|
|
Heather is working on something on her laptop. My
|
|
office (with my X station) is too small and cluttered
|
|
for all of us to hang out in there.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
Maybe I'll remember to look at it some other time.
|
|
</BLOCKQUOTE>
|
|
<P><STRONG><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
Mark F. Johnson
|
|
Systems Administrator
|
|
Maxwell Library
|
|
Bridgewater State College
|
|
</STRONG></P>
|
|
<!-- sig -->
|
|
|
|
<!-- end 44 -->
|
|
<!--startcut ======================================================= -->
|
|
<P> <hr> <P>
|
|
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
|
|
>Copyright ©</a> 1999, James T. Dennis
|
|
<BR>Published in <I>The Linux Gazette</I> Issue 37 February 1999</H5>
|
|
<P> <hr> <P>
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<P align="center">
|
|
<table width="98%"><tr valign="center" align="center">
|
|
<td rowspan="3" colspan="4"><A HREF="../lg_answer37.html"><IMG
|
|
SRC="../../gx/dennis/answernew.gif"
|
|
ALT="[ Answer Guy Index ]"></A></td>
|
|
<TD width="8%"><A HREF="./1.html">1</A></TD>
|
|
<TD width="8%"><A HREF="./2.html">2</A></TD>
|
|
<TD width="8%"><A HREF="./3.html">3</A></TD>
|
|
<TD width="8%"><A HREF="./4.html">4</A></TD>
|
|
<TD width="8%"><A HREF="./5.html">5</A></TD>
|
|
<TD width="8%"><A HREF="./6.html">6</A></TD>
|
|
<TD width="8%"><A HREF="./7.html">7</A></TD>
|
|
<TD width="8%"><A HREF="./8.html">8</A></TD>
|
|
<TD width="8%"><A HREF="./9.html">9</A></TD>
|
|
<TD width="8%"><A HREF="./10.html">10</A></TD>
|
|
|
|
</tr><tr valign="center" align="center">
|
|
<TD><A HREF="./11.html">11</A></TD>
|
|
<TD><A HREF="./12.html">12</A></TD>
|
|
<TD><A HREF="./14.html">14</A></TD>
|
|
<TD><A HREF="./15.html">15</A></TD>
|
|
<TD><A HREF="./16.html">16</A></TD>
|
|
<TD><A HREF="./17.html">17</A></TD>
|
|
<TD><A HREF="./18.html">18</A></TD>
|
|
<TD><A HREF="./19.html">19</A></TD>
|
|
<TD><A HREF="./21.html">21</A></TD>
|
|
<TD><A HREF="./22.html">22</A></TD>
|
|
|
|
</tr><tr valign="center" align="center">
|
|
<TD><A HREF="./23.html">23</A></TD>
|
|
<TD><A HREF="./28.html">28</A></TD>
|
|
<TD><A HREF="./29.html">29</A></TD>
|
|
<TD><A HREF="./30.html">30</A></TD>
|
|
<TD><A HREF="./31.html">31</A></TD>
|
|
<TD><A HREF="./32.html">32</A></TD>
|
|
<TD><A HREF="./33.html">33</A></TD>
|
|
<TD><A HREF="./34.html">34</A></TD>
|
|
<TD><A HREF="./37.html">37</A></TD>
|
|
<TD><A HREF="./38.html">38</A></TD>
|
|
|
|
</tr><tr valign="center" align="center">
|
|
<TD><A HREF="./39.html">39</A></TD>
|
|
<TD><A HREF="./41.html">41</A></TD>
|
|
<TD><A HREF="./42.html">42</A></TD>
|
|
<TD><A HREF="./43.html">43</A></TD>
|
|
<TD><A HREF="./44.html">44</A></TD>
|
|
<TD><A HREF="./45.html">45</A></TD>
|
|
<TD><A HREF="./46.html">46</A></TD>
|
|
<TD><A HREF="./47.html">47</A></TD>
|
|
<TD><A HREF="./48.html">48</A></TD>
|
|
<TD><A HREF="./49.html">49</A></TD>
|
|
|
|
</tr></table>
|
|
</P>
|
|
<P> <hr> <P>
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<P> <hr> <P>
|
|
<!-- begin lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<A HREF="../index.html"
|
|
><IMG SRC="../../gx/indexnew.gif" ALT="[ Table Of Contents ]"></A>
|
|
<A HREF="../../index.html"
|
|
><IMG SRC="../../gx/homenew.gif" ALT="[ Front Page ]"></A>
|
|
<A HREF="../lg_bytes37.html"
|
|
><IMG SRC="../../gx/back2.gif" ALT="[ Previous Section ]"></A>
|
|
<A HREF="../york.html"
|
|
><IMG SRC="../../gx/fwd.gif" ALT="[ Next Section ]"></A>
|
|
<!-- end lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
</BODY></HTML>
|
|
<!--endcut ========================================================= -->
|