nv-l
[Top] [All Lists]

RE: [nv-l] Variable question

To: <nv-l@lists.us.ibm.com>
Subject: RE: [nv-l] Variable question
From: "Colin Mulkerrins" <Colin.Mulkerrins@anpost.ie>
Date: Mon, 21 Mar 2005 14:44:50 -0000
Delivery-date: Mon, 21 Mar 2005 14:45:36 +0000
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
Reply-to: nv-l@lists.us.ibm.com
Sender: owner-nv-l@lists.us.ibm.com
Thread-index: AcUuIfCxoeTxODZNRQyZwRB5qndm7gAAf5OA
Thread-topic: [nv-l] Variable question
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@lists.us.ibm.com [mailto:owner-nv-l@lists.us.ibm.com] On Behalf Of Mauro
Sent: 21 March 2005 14:26
To: nv-l@lists.tivoli.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>

Archive operated by Skills 1st Ltd

See also: The NetView Web