Share an AIX process monitoring script:When the number of MWM processes is greater than 2 o'clock, call SendMail to send the message to notify the user, the script is as follows#!/usr/bin/ksh#---------------------------------------------------------------##scriptname: MWMCheckShell#Createdby:Xin23# on:2015.02.04#------------------------------------------------------ ---------##definedirectorymwmcheckdir=/home/monitor/mwm_check_ dircd $MWMCHECKDIR #def
Calculating the factorial of 10 using a scriptSimply explain:#!/bin/bash describes the Bash shell program that the shell uses. This is a very short sentence.For i in ' SEQ 1 10 ' can also be written for I in 1 2 3 4 5 6 7 8 9 10Single quotation marks above the TAB keyNote expr Each option must be separated by a space.After the shell script is written, add the Execute permission to the script.Can be seen without permission.To increase execution permiss
times Produce_name to be NULL cannot insertDECLARE vn_nullable VARCHAR2 (1);BEGIN SELECT Nullable into vn_nullable from user_tab_columns WHERE table_name =' Bt_buy_fprecord ' and column_name =' produce_name '; -- if null is not allowed IF vn_nullable = ' N ' Then -- change to allow empty EXECUTE IMMEDIATE' ALTER TABLE bt_buy_fprecord MODIFY produce_name VARCHAR2 ($) NULL ' ; END IF; COMMIT;END ;5. Modify the field length-- modified by: Yixian-- Modification Time: the years 9 Mon
* FROM Sys.server_audit_specifications --Server Audit Specification Object
SELECT * from Sys.server_audit_ Specification_details --Audit action of the server Audit specification object
SELECT * from Sys.database_audit_specifications --Database Audit Specification Object
SELECT * FROM Sys.database_audit_specification_details --Audit action for Database Audit specification Object
SELECT * from Sys.dm_audit_ Actions --all available action groups
select * FROM Sys.dm_audit_class_type_map
This article mainly introduces the script example for re-installing WordPress with one click in Linux, which is especially suitable for operations on VPS servers. if you need it, you can refer to the website which may be migrated from time to time, if the database is lost due to misoperations, I wrote a script to reinstall wordpress with one click to save time.
ls [ax6]* ls [[: alpha:]][[:d igit:]]* Job Three: Write a script to add 10 users user1 to User10, but requires only if the user does not exist To add the answer: #!/bin/Bash for I in ' seq 1 ';d o cut-d:-f1/etc/passwd |grep "user$i" 2>>/tmp/etc.err | | Useradd user$i Done Job Four: Write a script to test 192.168.0.151 to 192.168.0.254 If all hosts are online, if online, the "IP is up" displays as If the re
services, greatly increased maintainability, This is one of the reasons why fcgi and other similar patterns are so popular.
However, it is because of this model, but also brings a number of problems. For example, the "Nginx File Parsing Vulnerability" released by 80sec last year is actually a problem because of fcgi and Webserver's understanding of the script path-level parameters. In addition, since fcgi
In 4.0, the most important major changes are as follows:
-Allow arrays to be directly assigned to each other and allow arrays to be parameters of a function.
-Lets you call a function declared later in a function, that is, the function declaration has nothing to do with the calling relationship. Make indirect recursion possible.
-Allows global variables to be defined at the script location after the function is defined. You can also declare a global v
Today, a small framework tratto for managing Cisco devices, written in Python, can be used to execute commands in bulk.
There are 3 main files after download:
systems.py defines the operating systems of a number of different devices and their common commands.
Connectivity.py is the main implementation of the code, in fact, the main is the use of Python pexpect module.
driver.py is an example file.
[Root@safe tratto-master]# cat driver.py#!/usr/bin/e
The most basic form of port ING is to transfer all data sent from one port to another through an intermediate port, here we will take a look at the example of a script program that implements the port ing function under the TCP protocol in Python.
1 Port ing
For example, the role of port ING is described.
There are three computers A, B, and C. A and B are interc
its coordinate information in a surfer ASCII grid format file.7, drawing, this is to test it. The 1 in array B is indicated by a red dot, and 0 is shown with a gray dot.Script Program:#Create a 50*80 2D arrayA = Zeros ((50,80), dtype='int')#Create x/y vectorx = Arange1 (60, 80, 1) y= Arange1 (10, 50, 1)#Read shape FileM_china = Shaperead ('d:/temp/map/china.shp')#Inpolygon function, In:1, out:-1b =A.inpolygon (x, y, M_china)#Change-1 to 0B[b==-1] =0#Save to a surfer ASCII grid data filefn ='D:/
match URL URL:http://([\w-]+\.) +[\w-]+ (/[\w-./?%=]*)?Regular expression that matches the phone number and starts with a number:((\ (\d{3}\)) | (\d{3}\-))? 13\d{9}|15[89]\d{8} or [+]{0,1} (\d) {1,3}[]? ([-]? ((\d) | []) {1,12}) +Match regular telephone, fax number, can "+" start, except number, can contain "-" Regular expression:\d{3,4}-?\d{7,8}-?\d{0,1} or [+]{0,1} (\d) {1,3}[]? ([-]? ((\d) | []) {1,12}) +Regular expressions that match a particular form of numbers and identifiers (such as 60~
Matching rules can not be used "/.Source code Example:.The code is as follows:Header ("Content-type:text/html;charset=utf-8");$str = ' Test PHP regular match out JS code test PHP regular match out JS code test PHP regular match out JS code test PHP regular match out JS code test PHP regular match out JS code test PHP regular match out JS codeTest PHP regular match the JS Code ';$preg = "/$newstr = Preg_replace ($preg, "", $str, 3); The fourth paramete
The script that recursively iterates through the directory with the shell writes recursively traverses the specified directory and prints the file name under the directory.
Example 1:
Copy Code code as follows:
#!/bin/sh
function Scandir () {
Local Cur_dir Parent_dir Workdir
Workdir=$1
CD ${workdir}
if [${workdir} = "/"]
Then
Cur_dir= ""
Else
cur_dir=$ (PWD)
Fi
For dirlist in $ (L
The Vim plug-in is a. Vim script file that defines functions, mappings, syntax rules, and commands that you can use to manipulate windows, buffers, and rows. A general plug-in contains the command definition and event hooks. When you write a vim plug-in using Python, the function is written using VIML, although VIML is quick to learn, Python is more flexible, for example, you can use Urllib/httplib/simplejs
Merra is a re-analysis data of NOAA, HDF data follow the Coards protocol, reading is relatively simple.Script Program:#Add Data Filefolder ='d:/temp/hdf/'FNS='MERRA300.PROD.ASSIM.TAVG1_2D_SLV_NX.20150101.SUB.HDF'fn= Folder +Fnsf=AddFile (FN) VName='t2m'T=f[vname]t2m=t[0,:,:]#Plotaxesm () Mlayer= Shaperead ('d:/temp/map/country1.shp') geoshow (mlayer) layer= IMSHOWM (t2m, 20) Colorbar (layer, orientation='Horizontal') title (VName+'At time=0') axism ()Meteoinfolab
Multiple Y-axes are important when comparing data ranges that are relatively large. A Twinx function is provided in Meteoinfolab to generate a new Axes based on the existing coordinate system (Axes), which causes the existing Axes not to draw the right y-axis, and the newly generated Axes draws only the right y-axis. The YAxis function can set the y-axis of a axes, the first parameter is a axes object, you can set the y-axis color and offset (shift), and the 3rd y-axis must be offset to avoid th
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.