Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Trouble with $ in script

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
digitalwav



Joined: 22 Aug 2008
Posts: 14
Location: New York

PostPosted: Tue Oct 07, 2008 2:07 pm    Post subject: Trouble with $ in script Reply with quote

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!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group