My friend gave me a topic, which is to use Perl to implement a Web site monitoring script.The main implementation of this script is a few points, each interval for a period of time to obtain the response status of the site, the Web site respond time.If an error is answered, the answer status code is sent in the form of a message.First, the answer state is processed.This can be implemented using Lwp::userage
Automatic indentation and alignment of the Perl script using the *** code *** using the *** language.
In the lab for FPGA development, we often use OpenGL. The code specification becomes a problem. As a result, we have written a Perl script to normalize the code, mainly for automatic indentation and alignment.
The Code
Recently, perl has been re-consolidated, and the previous beginner's code has been changed, so that win's cmd can use the linux method to add password verification to cmd.The following describes how to automatically execute linux. bat when you set cmd.exe to run:Open Registry Editor,[HKEY_LOCAL_MACHINESOFTWAREMicrosoftCommand Processor]Set "AutoRun" = "linux. bat"
Next is the content of linux. bat.@ Echo off@ Titel: Specifies the cmd.exe@ Color c@ Pro
The example uses the oracle11g dbms_scheduler package to execute the perl script to load the data file. The three processes are SET_JOB_ARGUMENT_VALUE and CREATE_JO respectively.
In this example, the oracle 11g dbms_scheduler package is used to execute a perl script to load data files. The three processes are SET_JOB_A
Sometimes we execute a script, because some programs in the script are suspended and time-out, which affects our judgment on the next step. At will, it is necessary to set the timeout settings for functions and processes so that they can return a state after a period of no response.
In the command parameters, ssh-o ServerAliveInterval = 60 can be controlled to 60 seconds.
For example, if ClientAliveInterva
Sending a script a few days ago is very slow. Using Time can only know the total time, but cannot confirm the reason. We found that devel: nytprof is a very good tool.
If you have the root permission, then:
Perl-mcpan-e Shell> Installjson: Any)> Installdevel: nytprof
If you do not have the root permission, then:
Create a folder in the home directory, such as/home/username/
Who can convert this PERL script to VBS-General Linux technology-Linux programming and kernel information? The following is a detailed description. You can help your younger brother. I have never written a script, but who can compile this PERL script into VBS. Not very long.
The script iterates through the files in the directory and replaces the target string with a regular expression match.#!/usr/bin/perl-wuse strict;# Trave Target directory and modify files under it.# Modified files are matched using regex.# # v1.1use Getopt::long;my $usage = q{usage:fix_fetch_found [Options] [dir] Output is write back to files and marked W ith/*by Script
The python perl script cannot be directly executed after it is submitted by cvs.The python perl script cannot be directly executed after it is submitted by cvs.
The reason is that the line feed in windows is different from that in linux. At the time of submission, Eclipse sets the ASCII format.
The solution is:1. Set
-- Start
Perl is a very loose language. By default, we use an undefined variable or perform mathematical operations on a string and a number. It does not report any errors, so when we write a Perl script, we 'd better use one of the following methods for debugging.
#! /Usr/bin/perl # method 1 -- modify the sandband a
To write some scripts that simplify administrative operations, here is one of the underlying scripts.For a person who has never used a Perl script, it is still a bit difficult for me to go directly to the code.This script is used to send the remote MySQL command and receive the result, the function is relatively simple, the later will gradually improve.#!/usr/bin
In the perl script, systemgrep-general Linux technology-Linux technology and application information. For more information, see. In a perl script, I want to use system commands,
You can use system.
However, when I write:
$ Str = system ("tail-f/tmp/test. log | grep-E aaa | bbb ");
It prompts that "| bbb" in aaa | b
PHP cgi|perl Shell Script Way
Why is PHP so red?
Recently, PHP (Personal hypertext preprocessor) seems to have become the most widely used web-processing language in the last two years, and its convenience, powerful features and opensource characteristics make it gradually erode to the traditional CGI is even the market for MicroSoft ASP (Active Server Page), where almost every major web site recruits PHP
Linux script language PERL template application details-Linux general technology-Linux programming and kernel information, the following is a detailed description. A lot of similar HTML code is often used when compiling a PERL program. In this way, not only is it difficult to write, but once the page needs to be modified, and the program is very large, it will be
(Please help) php, perl, and other script software split one file into multiple TXT files. Php, perl, and other script software split a file into multiple TXT files. The file content is as follows: IP, MOIndex, className, fdn, latitude, longpolling, matchVersion, name, neID, neType, neVersion, realLatitude, realLo (for
I have a Perl script named A. pl, which contains a statement similar to the following to read the input value of the command line:
My $ device_name = If I use the system or readpipe command in the B. pl script to bond the script a. pl, the command line prompts a value when running the preceding statement.
Sometimes,
Original article address:Http://blogread.cn/it/article/743? F = WB
I used Perl to write some monitoring scripts and put them in crontab for scheduling and execution. Sometimes you will find that a script runs for too long and starts multiple instances at the same time. Therefore, it is necessary to add control to the script to run only one instance.
The si
The main function of the SSH limit perl script is:1. Limiting the maximum number of logons for an SSH user is n,n customizable.2. Support White list, such as root, test login is not restricted.
If an SSH user's maximum number of logons exceeds a specified number, then the login will kick off the previous login to control the number of logins.
The script require
Write some monitoring scripts in Perl and put them in crontab to schedule execution. It is sometimes found that a script runs too long and runs multiple instances at the same time, so it is necessary to control the script and run only one instance.
The simplest natural idea is to check and create an empty lock file in the sc
Previously, I did not pay much attention to my blog. I felt distressed when I lost my blog. Now I am paying attention to it and decided to regularly back up SQL statements. Write a script as follows:
Copy codeThe Code is as follows :#! /Usr/bin/perl
Use warnings;
Use strict;
Use MySQL: Backup;
Use Mail: Sender;
Open my $ tmp_ SQL, '>', "backup. SQL ";
My $ mb = new MySQL: Backup ('dbname', 'localhost', 'dbu
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.