nv-l

RE: [nv-l] Variable question

2005-03-21 09:45:35
Subject: RE: [nv-l] Variable question
From: "Colin Mulkerrins" <Colin.Mulkerrins AT anpost DOT ie>
To: <nv-l AT lists.us.ibm DOT com>
Date: Mon, 21 Mar 2005 14:44:50 -0000
Mauro,
 
NetView escapes special characters in the variables, try something similar to the following in your script (the sed will remove the escape (\) characters...)
 
ip=`echo "$2" | sed  "s:\\\\\\::g"`
echo "Node $ip Down"|mail -s "The Node $ip..." mymail
 
Regards

Colin Mulkerrins
Enterprise Systems Management
An Post

-----Original Message-----
From: owner-nv-l AT lists.us.ibm DOT com [mailto:owner-nv-l AT lists.us.ibm DOT com] On Behalf Of Mauro
Sent: 21 March 2005 14:26
To: nv-l AT lists.tivoli DOT com
Subject: [nv-l] Variable question

Hi folks,

Running Linux 7.2 with Netview 7.1.4 fixpack 2:

I’ve configured trap to be send by mail using the Trapd-àcommand for automatic action:

 

Echo “Node $2 Down” | mail –s “The Node $2 …..”  mymail

 

When I receive it the variable $2 is passed with some kind of special character like

 

Node 172\.21\.12\.3 (rather than 172.21.12.3)…..

 

What wrong with it ?

 

Cheers

 

Mauro



***********************************************************************************
This e-mail and its attachments, is confidential and is intended for the addressee(s) only. If you are not the intended recipient, disclosure, distribution or any action taken in reliance on it is prohibited and may be unlawful. Please note that any information expressed in this message or its attachments is not given or endorsed by An Post unless otherwise indicated by an authorised representative independently of this message. An Post does not accept responsibility for the contents of this message and although it has been scanned for viruses An Post will not accept responsibility for any damage caused as a result of a virus being passed on.
***********************************************************************************
<Prev in Thread] Current Thread [Next in Thread>