Search Results

Search: Posts Made By: streetfighter2
1,545
Posted By streetfighter2
Thanks for the response guys, I figured out that...
Thanks for the response guys, I figured out that the script I was running the regex has an argument to "inverse regex" and that did the trick :)
1,545
Posted By streetfighter2
I'm actually using this command with a script...
I'm actually using this command with a script that takes regular expressions as arguments.
1,545
Posted By streetfighter2
Regex equivalent to ! (not)
I want to have a regex line equivalent to the following:

!\bfalse\b

basically search for not exact string "false"
Forum: Infrastructure Monitoring 10-18-2011
3,513
Posted By streetfighter2
Nagios - alert during business hours
Is there a way for certain nagios alerts to only alert during business hours?
2,083
Posted By streetfighter2
Awesome. Thank you! :b:
Awesome. Thank you! :b:
2,083
Posted By streetfighter2
perl - need help with 2 arrays to hash or 2d array?
I have 2 arrays:


@array1 outputs the following:

1
1
1
2


@array2 outputs the following

A
B
C
D
19,145
Posted By streetfighter2
Yes, thank you! that worked! :)
Yes, thank you! that worked! :)
19,145
Posted By streetfighter2
Hi Thanks for the help but I am getting the...
Hi Thanks for the help but I am getting the following output:


The output is: 8
, 8
, 8
, 9
19,145
Posted By streetfighter2
Perl question - How do I print contents of an array on a single line?
I have the following code:


print @testarray;


which returns:

8
8
8
9


How do I return the array like this:

The output is: 8, 8, 8, 9
2,211
Posted By streetfighter2
Need help with SNMP perl script
I want to have a script that takes the following:


Runs this Command:
snmpwalk -v 1 -c public devicename 1.3.2.1.15.1.1.3

which returns the following:
...
26,970
Posted By streetfighter2
SSH with a nologin account
Is it possible to SSH with an account that has its shell set to /sbin/nologin?

The reason I ask is because I am running an instance of nagios where I need to use SSH keys to run a check, but I am...
13,600
Posted By streetfighter2
How do I use pipe in perl
I want to do the following in perl:



print $output | grep ' something' | awk '{print $2}';



I know there is system(); but it does not behave the way I was expecting it in perl.
1,373
Posted By streetfighter2
Parsing information in perl
So i'm trying to write a perl script that logins into a network switch via ssh:

#sh ip traffic
IP statistics:
Rcvd: 1460119147 total, 563943377 local destination
0 format errors, 0...
Forum: Infrastructure Monitoring 01-12-2011
12,858
Posted By streetfighter2
How to avoid return code of 141?
I have a script that logins into a Cisco switch via SSH and does a ping to another IP. This script is used as a check for nagios. I only want an exit codes of either 2, 1, 0 for fail, warn, ok,...
1,759
Posted By streetfighter2
Perl - switch parsing
I want to write a script that performs this type of behavior:

Example:

./Myscript.pl -a ARGUMENTRun code 'a'

./Myscript.pl -b ARGUMENT
Run code 'b'

Do I use a case statement,...
6,454
Posted By streetfighter2
I added a .profile to /home/www However, I...
I added a .profile to /home/www

However, I still don't get the output of echo "$HOME"

---------- Post updated at 11:28 AM ---------- Previous update was at 10:41 AM ----------

You can...
6,454
Posted By streetfighter2
Running a shell script in apache
I have a shell script, that works when ran in the shell. When placed in the cgi-bin directory, it doesn't work as expected.

Looking at the logs, it seems that some environmental variables are not...
51,550
Posted By streetfighter2
Hey guys, so I basically wrote a simple script...
Hey guys, so I basically wrote a simple script that ssh's into different machines and grabs some info. However, the script isn't instantaneous with the output and it seems to give me a blank screen...
51,550
Posted By streetfighter2
Thanks for the information guys.
Thanks for the information guys.
51,550
Posted By streetfighter2
How can I execute a shell script from an html link?
I want to execute a shell script when clicking on an html link. I want the output of the script to be shown on the webpage. Whats the best way to achieve this?
1,129
Posted By streetfighter2
Thanks guys
Thanks guys
1,129
Posted By streetfighter2
Need help with awk
I have 2 files.

10.10.0.54 whatever69.com
10.10.0.59 mpls-10_10_0_59.com
10.70.4.22 monitor2-22.com
10.60.82.150 feed13.blah


10.10.0.54 10_10_cool
10.10.0.59 m2821-ds3-0201f10.net...
1,894
Posted By streetfighter2
Need help parsing a text file
I have a text file:

router1#sh ip blah blah | incl ---
Gi2/8 10.60.4.181 --- 10.60.123.175 11 0000 0000 355K
Gi2/8 10.60.83.28 --- ...
7,498
Posted By streetfighter2
Need help on ssh login script to cisco ios
I'm trying to write a login script to ssh into a cisco switch that will run some command remotely. Similar to this expect script located here:
SSH login expect shell script to supply username and...
9,330
Posted By streetfighter2
Perl question - print last element in a hash?
I am modifying someone else's code. There is a foreach statement printing the contents of a hash.

Can someone give me an example of printing the last element in a hash?

The output currently is...
Showing results 1 to 25 of 48

 
All times are GMT -4. The time now is 02:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy