<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Gllug] Stupid shell question</TITLE>
</HEAD>
<BODY>
<BR>
<BR>
<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: John Hearns [<A HREF="mailto:John.Hearns@cern.ch">mailto:John.Hearns@cern.ch</A>]</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I was just having some idle thoughts (as usual).</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> What I was thinking of is that we are deploying some new machines.</FONT>
<BR><FONT SIZE=2>> There is a default set of software (RPMs) installed.</FONT>
<BR><FONT SIZE=2>> We were just discussing at a meeting what if there was </FONT>
<BR><FONT SIZE=2>> software missing</FONT>
<BR><FONT SIZE=2>> which people normally use, and expect to be there on the new machines.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I've looked at the sources for bash, and it would be very easy to</FONT>
<BR><FONT SIZE=2>> put in a line to send a message to syslog (or wherever) when someone</FONT>
<BR><FONT SIZE=2>> uses a command which is not found. </FONT>
<BR><FONT SIZE=2>> But I would have to patch/recompile all the shells on the machine -</FONT>
<BR><FONT SIZE=2>> (ash bash ksh tcsh zsh) and I don't think its worth the effort for</FONT>
<BR><FONT SIZE=2>> the information we would get back.</FONT>
<BR><FONT SIZE=2>> As I say, I was just idly wondering about a smarter way to do this.</FONT>
</P>
<P><FONT SIZE=2>My 2pw</FONT>
</P>
<P><FONT SIZE=2>You could write a small perl script that tunnels STDERR into a file. I do not mean completely redirect. I believe in Perl you can have STDERR or STDOUT go to more than one place using pipes If you put a filter in this you can then sort it accordingly.</FONT></P>
<P><FONT SIZE=2>H</FONT>
</P>
<CODE><FONT SIZE=3><BR>
<BR>
*************************************************************************************<BR>
COLT Telecommunications<BR>
Registered in England No. 2452736<BR>
Registered Office: Bishopsgate Court, 4 Norton Folgate, London E1 6DQ<BR>
Tel. +44 20 7390 3900<BR>
<BR>
This message is subject to and does not create or vary any contractual<BR>
relationship between COLT Telecommunications, its subsidiaries or <BR>
affiliates ("COLT") and you. Internet communications are not secure<BR>
and therefore COLT does not accept legal responsibility for the<BR>
contents of this message. Any view or opinions expressed are those of<BR>
the author. The message is intended for the addressee only and its<BR>
contents and any attached files are strictly confidential. If you have<BR>
received it in error, please telephone the number above. Thank you.<BR>
*************************************************************************************<BR>
</FONT></CODE>
</BODY>
</HTML>