The security mavens here at IBM decided that some trap characters should
always be escaped lest some unscrupulous person embed a system command in
a trap variable and it cause your system harm should one of our trap
processing daemons unwitting echo that variable. Since the daemons
execute with root authority the result could be bad.
In any case, the dot is one of those, whether you put it in
AdditionalLegalTrapCharacters or not. So you have to get rid of it in your
script.
That's what the business about using sed was for in whatever post you read
it in. This one is for fixing a variable passed in as the second argument:
NODE=`echo "$2" | sed "s:\\\\\\::g"`
The sed is a template for removing 3 backslashes from a hostname, one
which would look like this: "jshanks1\.raleigh\.ibm\.com" when printed.
See how it works? The sed needs a pair of backslashes for every one that
occurs in the hostname. If the name were just "xyz\.ibm\.com" with only
two, then your sed would be sed "s:\\\\::g". Get it?
And of course in your case, you would probably have to do something like
this
NODE=`echo "$NVATTR_2" | sed "s:\\\\\\::g"`
depending on what varbind the hostname is in.
HTH
James Shanks
Level 3 Support for Tivoli NetView for UNIX and Windows
Tivoli Software / IBM Software Group
|