nv-l
[Top] [All Lists]

RE: EXEC in trapd.conf

To: nv-l@lists.tivoli.com
Subject: RE: EXEC in trapd.conf
From: "O'Neill, Dermott" <ONeillD@aetna.com>
Date: Tue, 12 Jun 2001 16:00:00 -0400
Hey Francois,
Try quotes around $1 when calling your script, "$1", this will keep the
shell from interpreting the special characters.

If that fails, try handling the special characters in the script, but keep
the quotes when calling the script.
Here's a command line example:
t.ksh "This is a big (bad) test."
yields the following output:
This is a big (bad test.

Here's the file:
$ cat  t.ksh
#! /usr/bin/ksh
var1=$(echo "$1" | tr -d ')')

echo $var1
return 99

The ) has been deleted.

Good Luck,
--Dermott

-----Original Message-----
From: Francois Le Hir/Quebec/IBM [mailto:flehir@CA.IBM.COM]
Sent: Tuesday, June 12, 2001 2:34 PM
To: nv-l@tkg.com
Subject: [NV-L] EXEC in trapd.conf



Hi,

I am using some EXEC command in /usr/OV/conf/C/trapd.conf in order to
execute a script when I receive a specific trap.
I use the following syntax:
EXEC /usr/script/trappopup keyword $1
unfortunately, in some cases, the $1 parameter contain some character (, <
or >.
when this appends the script doesn't get executed and I get an error in
/usr/OV/log/ovactiond.log.

I tried to use EXEC /usr/script/trappopup keyword "$1" but it doesn't
change anything.

I can not change the text of the message of the trap.
any idea ?

Regards,

Francois Le Hir
Network Projects & Consulting Services
IBM Global Services
Phone: (514) 205 6695


<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web