[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::netview-nt

Title:Notes Conference for TME 10 NetView for NT NT
Moderator:TUXEDO::BAKER
Created:Mon Apr 03 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:540
Total number of notes:1903

523.0. "Embedded "'s in addtrap" by ICS::cop-dhcp-2-243.cop.dec.com::schofieldk (Keith Schofield) Mon Mar 03 1997 09:41

I use the addtrap utility to add a bunch of user defined traps to NetView,
one of the parameters I pass to my .bat file is $1, however I need to enclose
this in double quotes.

	ie addtrap ..... -c c:\usr\MyTrapHandler.dat -A first_param $1

where $1 is the second parameter to my .bat file. Is there any way of doing
this (not from the GUI).

	I need the command (as seen from the GUI to look like this

	c:\usr\MyTrapHandler.bat $A "$1"

	Thanks,
	Keith


T.RTitleUserPersonal
Name
DateLines
523.1Try "$1""WOTVAX::dhcp20.olo.dec.com::hunt_jsTue Mar 11 1997 12:0322
Keith,

I have only done something similar using the GUI, so can't help there I am 
afraid.

However, its worth noting (and perhaps this might be causing you a problem 
too) that, when using the GUI, to get the following quote on numeric 
parameters to be seen actually requires two quotes.

Confused? Me too!

If you want to use "$1" in the command line then you actually have to use 
"$1"". For the non-numeric parameters (e.g. $A) then bounding them with a 
single quote is sufficient (e.g. "$A").

It seems that this is a characteristic of UNIX (now there's a surprise!).

Maybe you need to do something similar in you ADDTRAP command?

Hope this helps.

Jim