Quantcast
Channel: Admins Goodies » perl
Browsing all 14 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

How to grep string in perl [closed]

How to grep the string in perl. Variable sessionWeb contains a web page html code. I want to grep “active Sessions” from this and want to print as below. For example the line in the web page will be...

View Article



Image may be NSFW.
Clik here to view.

ksh + print the last value from parameter ( as $_ in perl)

I need advice – how to print the same last value in ksh scripts without to print param argument for example in perl last value is $_ , but we not have this option in ksh script example – of ksh script...

View Article

Image may be NSFW.
Clik here to view.

nginx redirect issue with upstream configuration

I have a website running with nginx and Plack/Starman as upstream. simple configuration looks like: upstream findmjob { server unix:/tmp/findmjob.sock; }server { listen 80; server_name findmjob.com...

View Article

Image may be NSFW.
Clik here to view.

How to listen for SNMP Traps from SNMP enabled network devices?

I just began working for my school’s networking department, and I was assigned a project to develop a program to listen for traps from SNMP network devices. The device I am testing with an Access...

View Article

Image may be NSFW.
Clik here to view.

perl + Match last number in file and reduce it by one

I want to add the following perl command in my bash script please advice how to change (reduce by one ) the last number that start with “+” character in file with perl ? Example of original file (...

View Article


Image may be NSFW.
Clik here to view.

Config Server Firewall: You need to install the missing perl modules and then...

I am trying to install config server firewall however when i follow the tutorial and run install.sh i get the following error. Can anyone help? root@localhost:~/csf# sh install.shConfiguring for...

View Article

Image may be NSFW.
Clik here to view.

Can’t install Perl module Apache::SizeLimit on CentOS

On a CentOS machine I have installed mod_perl: yum install mod_perl ... Package mod_perl-2.0.4-10.el6.i686 already installed and latest version Ok, now I want to install the Perl module...

View Article

Image may be NSFW.
Clik here to view.

How can I check the location of perl and CPAN files?

I constantly have to set up new servers for an employer of mine for an exact purpose of his, and as such they all have to be set up in exactly the same way. So I’ve created a script in PHP that I run...

View Article


Image may be NSFW.
Clik here to view.

Calling sudo within a script that was called with sudo prompts for password...

A PHP program I am working with (LConf) calls a script using sudo. I have allowed the user apache to run the script and have tested with sudo -u apache /usr/local/LConf/lconf_deploy.sh. I am being...

View Article


Image may be NSFW.
Clik here to view.

Cannot run logwatch due to Date::Manip issue

I tried to run logwatch at follows [root@machine cron.daily]# ./0logwatch ERROR: Date::Manip unable to determine TimeZone.Execute the following command in a shell prompt: perldoc Date::Manip The...

View Article

Image may be NSFW.
Clik here to view.

perl + sed + remove lines that start with “#”

please advice I have linux and solaris machines, and I need command that work on both OS I use the following perl line in order to remove all lines that start with “#” why perl command not work ,...

View Article

Image may be NSFW.
Clik here to view.

Linux/Solaris verification ( after hostname change ) in files according to...

According to the following Perl command ( this command part of ksh script ) I can replaced old hostnames with new hostnames in Linux or Solaris previos_machine_name=linux1a...

View Article

Image may be NSFW.
Clik here to view.

Perl script which returns multiple exit codes

I have a Perl script that executes another Perl script inside it: #!/usr/bin/perl use strict; use warnings; use Getopt::Long qw(:config no_ignore_case bundling_override); no warnings 'uninitialized';...

View Article


Image may be NSFW.
Clik here to view.

What is the easiest way to upgrade my existing Perl 5.14 to Perl 5.16 on...

I use the ports system on FreeBSD. What is the easiest way to upgrade Perl using ports? I currently uninstall all of perl and it’s dependencies. I’d think there would be a cool way to upgrade Perl and...

View Article
Browsing all 14 articles
Browse latest View live




Latest Images