http://blog.csdn.net/gyanp/article/details/79030561) Format adjustment has the following parametersSet echo on/off displays the commands that need to be executed in the scriptSet feedback on/off indicates how many rows are returned after the select
Shell programming1 echo-e recognition \ escape character \a \b \ n \ \x hex \ 08 Binary, etc.#!/bin/bashEcho-e "Hello World"Execute script: Mode 1:chmod 755 hello.sh./hello.shWay 2:bash./hello.sh (this way does not need to give execute permission)1
The Binlog log is as follows:/*!50530 SET @ @SESSION. pseudo_slave_mode=1*/;/*!40019 SET @ @session. max_insert_delayed_threads=0*/;/*!50003 SET @[email protected] @COMPLETION_TYPE, completion_type=0*/;DELIMITER/*!*/;# at 120#160111 16:37:29 Server
Suppose we define a variable as:File=/dir1/dir2/dir3/my.file.txtDifferent values can be replaced with ${}, respectively:${file#*/}: Delete the first/its left string: dir1/dir2/dir3/my.file.txt${file##*/}: Remove the last/and left string: my.file.txt$
1. Nginx configuration file1.1, the project directory is placed in the system/var/www/Upstream App {# Path to Unicorn SOCK file, as defined Previouslyserver unix:/var/www/app/shared/sockets/unicorn.sock Fail_ timeout=0; #server 127.0.0.1:4000
WC: View File Statistics usage: $ WC filename1. $ WC fileName$ WC FileNameX Y Z/desktop/helloX: Indicates the number of rowsY: Indicates the number of wordsZ: Indicates the number of bytes/desktop/hello: Indicates file name2. $ wc-l FileName-l
Digital time Transfer Standard Time:Digital time such as: 20151009163000Standard Time: 2015-10-19-16:30:00A= ' head-1/home/xxx/xxx/bin/.status |awk-f= ' {print $ {} ' |sed-r ' s/([0-9]{4}) ([0-9]{2}) ([0-9]{2}) ([0-9]{2}) ([}) ([0-9]{2}] ) ([0-9]{2})
Path to the LS Etc/init.d/shell scriptls/usr/local/apache2/Ls/usr/local/apache2/bin/apachectl1. Shell FeaturesOrder history!! !$!n! characterTab key to complete file path or commandAlias a= "B" Unalias AWildcard * Matches 0 or more characters? Match
Miss the task Manager under Windows, ah, what to look at the pleasing of the program mouse points can be killed.Today in the Firefox browser to browse the Web page, the interface instantly stuck, nothing can point, test, only switch to command line
View shell scripts for Linux server network trafficWhen uploading a large number of files, you can use this script to implement monitoring!#!/bin/sh ## #统计5s内的平均流量, if [ "$" = " ];then echo -" in megabytes e
First, the Loop statement forloop control statements in Bash :for,while,untilFor loop Syntax 1:For variable name in list;Loop bodyDoneOperating features:First pass: Assigns the first element in the list the variable name definition, then executes
1Pre-work: source code for Apache installation. The installation directory is/usr/local/httpd2 3 Mission Requirements:4 1, available through service httpd start|stop|status|Restart command to control a service5 6 2, httpd service can boot from start7
Shell Programming Simple TutorialI can't say how many complex shell scripts I've written, but some simple scripts write a lot. Working under Linux, sometimes bits and pieces of work, if you write a shell script to deal with, you will find that it is
I. Function definition Grammar: [function] functionname[()]{action; [return int;]} Description 1, can be with function fun () definition, you can also directly fun () definition, without any parameters. 2, the parameter returns, can display add:
Recently in the thinking of a problem, the online server run a variety of services, it may be running Nginx, another run is MySQL, the other is to run NFS or other services, etc. Through a certain script fixed write some services to implement
In the shell, arguments can be passed to a function when it is called. Inside the function body, the value of the parameter is obtained in the form of a $n, for example, $ $ for the first argument, and $ = for the second argument ...Examples of
Use crontab you can perform a specified time in the Shell script or a series of Linux command. For example, the system administrator schedules a backup task to run every dayEntry# crontab–eThis enables the edit mode to open the personal crontab
Recently writing a shell script, I would like to use a For loop to read the contents of the file, but found that every line in the file has a space, obviously with a for loop does not work, my intention is to read a row of the file content, so
Operation and maintenance experience sharing as a topic, currently a total of 7 articles
Operation and maintenance experience sharing (i)--Linux Shell's Chatterserver service control script
Operation and maintenance experience Sharing
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service