Copy Code code as follows:
#!/bin/bash
#This the script is Usage for describle CPU Hard memery Utilization
Total=0
Idle=0
System=0
User=0
Nice=0
Mem=0
Vmexec=/usr/bin/vmstat
Which SAR >/dev/null 2>&1
If [$?-ne 0]
Then
Ver= '
Normally the LS-listed files that want to be directly piped through the RM-RF delete are not valid. At this point, we need to cooperate with the command Xargs use:
For example:Ls-t|tail-10|xargs RM-RF//sorted by time, delete the last 10 files
Of
or part of the cronjob, which is running in the background interactively in the rails timing task
Checkipaddress () {echo $ |grep "^[0-9]\{1,3\}\.[ 0-9]\{1,3\}\. [0-9]\{1,3\}\. [0-9]\{1,3\}$ ' >/dev/null if [$ = 1]; Then return 1 Else a= '
First, clean up the idea first, ~ ~
First: We need to upload the file to the server.
Then: Read Excel data columns to display
Then: Let the user select the corresponding relationship of the field
Then: Submit the data, read the corresponding
Last year wrote a python version of the Hadoop environment automatic deployment, but the end of the run, no longer in the mood to pick up, will be part of the blog, some feel useful, take to use it, as far as possible to improve the post back again,
If one, if base 1, single branch 1.1 syntaxif语句语法 单分支结构语法: if [条件]; then 指令 fi 或 if [条件] then 指令 fi1.2 Examples[[email protected] day4]# cat if-single1.sh #!/bin/sh#功能:单分支if结构整数比较,用-lt格式例子#created by
Use shell scripts to simply simulate simultaneous read and write operations to specific filesFormat of file contents:Field1, Field2, field3, Field4As a delimiter, but there are spaces.
The script uses the following:
#数字段形式For i in {1..10}DoEcho $iDone#详细列出 (characters and not many items)For File in 1 2 3 4 5DoEcho $FileDone#对存在的文件进行循环For shname in ' LS *.sh 'DoName= ' echo ' $shname | Awk-f. ' {print '} 'Echo $nameDone#查找循环 (This method can also be used when
Variable
Get the native host name
#hostname
Get the system version number
#uname-R
Get CPU Type
Get the CPU working frequency
Cat/proc/cpuinfo
Get Memory
AwkI. Introduction of AWKscripting languageVariable..... Process Control array functions use awk for Data statistics 1 Number of users in the statistical system, number of built-in users 2 statistics Site Server traffic for
1. Use the system $RANDOM variables
fdipzone@ubuntu:~$ Echo $RANDOM
17617
The range of the $RANDOM is [0, 32767]
If you need to generate more than 32767 random numbers, you can do so in the following ways.
Example: Generating random numbers
#登录FTP服务器获取指定文件#$1: Server address#$2: Account#$3: Password#$4: File path name#$5: Local File path name#$6: Local file name#判断ftp上传结果:#获取上传后的远程文件大小重定向在本地文件tmp, the same as the local file size, the same as upload success, and finally delete the local
Design a prompt menu for user selection, and perform operations and display based on user selection.
Menu: 1. Start vi Editor 2. Start x-windows and enter the graphic interface 3. Start the background printing process. 4. Exit ctrl + c.
#!
PHP stands for "Hypertext Preprocessor", it is a server scripting language.What Can PHP do?
PHP can generate dynamic page content
PHP can create, open, read, write, delete, and close files on the server
PHP can collect form data
Start with an example.Start the editor, create a php file, and type the following code:RunName the file test.php and store it in the e:html directory.Access the PHP file in the browser address bar: http://127.0.0.1/test.php, the output is as follows:
These are all hard work. Remember to look back !!! /* Echo Qqqqqq \ nqqqqqqqq qqqqqqqqqqqqqqq \ rqqqqqqqqqqqqqqqqqqqqqqMark */// The technical mark should be set to another line and written in the top level!// Similar ""// The most fatal point is
Summary of methods to optimize the PHP program. 1. Ifamethodc ++ anbestatic, declareitstatic. Speedimprovementisbyafactorof4. if a method can be static, it will be declared as static. The speed can be increased to 4 times. 2. ec 1. if a method c ++
This article mainly introduces the summary of four functions that PHP outputs to the browser. This article summarizes print (), echo (), printf (), sprintf () the four output functions can be referenced by the following code:
/** 0x01: print ()
This article describes nine essential PHP programming skills. This article describes variable declaration, parsing errors, common errors, MySQL errors, differences between echo and print, and null strings (
Variable Declaration
If you declare a
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.