[Gllug] Stupid shell question

Jackson, Harry HJackson at colt-telecom.com
Wed Jun 19 12:06:02 UTC 2002



> -----Original Message-----
> From: John Hearns [mailto:John.Hearns at cern.ch]
> 
> I was just having some idle thoughts (as usual).
> 
> What I was thinking of is that we are deploying some new machines.
> There is a default set of software (RPMs) installed.
> We were just discussing at a meeting what if there was 
> software missing
> which people normally use, and expect to be there on the new machines.
> 
> I've looked at the sources for bash, and it would be very easy to
> put in a line to send a message to syslog (or wherever) when someone
> uses a command which is not found. 
> But I would have to patch/recompile all the shells on the machine -
> (ash bash ksh tcsh zsh) and I don't think its worth the effort for
> the information we would get back.
> As I say, I was just idly wondering about a smarter way to do this.

My 2pw

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.

H


*************************************************************************************
COLT Telecommunications
Registered in England No. 2452736
Registered Office: Bishopsgate Court, 4 Norton Folgate, London E1 6DQ
Tel. +44 20 7390 3900

This message is subject to and does not create or vary any contractual
relationship between COLT Telecommunications, its subsidiaries or 
affiliates ("COLT") and you. Internet communications are not secure
and therefore COLT does not accept legal responsibility for the
contents of this message.  Any view or opinions expressed are those of
the author. The message is intended for the addressee only and its
contents and any attached files are strictly confidential. If you have
received it in error, please telephone the number above. Thank you.
*************************************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20020619/21daa04d/attachment.html>


More information about the GLLUG mailing list