digitalwav
Joined: 22 Aug 2008 Posts: 14 Location: New York
|
Posted: Tue Oct 07, 2008 2:07 pm Post subject: Trouble with $ in script |
|
|
I have the following command that runs fine at the linux command prompt:
/usr/local/nagios/libexec/check_nt -H 192.168.0.7 -p 12489 -v COUNTER -l "\\MSSQL\$CMP:Transactions\\Transactions"
Note the escaped $
Now, when this command is packaged into a perl script and assigned to a variable like this:
$transactions = `/usr/local/nagios/libexec/check_nt -H 192.168.0.7 -p 12489 -v COUNTER -l "\\MSSQL\$CMP:Transactions\\Transactions"`;
It doesn't work. In stead of outputting 22 it outputs zero. I am positive it has to do with the $ but I have no idea what to do about it! |
|