Common shortcuts in the command mode of the 1.vim editorCommand functionDD Delete (cut) the entire line where the cursor is located.5DD Delete (cut) 5 lines starting at the cursor.YY copies the entire line where the cursor is located.5yy Copies
The main record is the concurrency and serial execution of commands in the shell script.By default, the commands in the shell script are executed serially, and must wait until the previous command is finished before executing the next command, but
Special symbols and their escapeAs you know, a shell command is made up of a command name and its arguments, for example cat testfile , where cat is the command name and Testfile is a parameter. The shell passes the parameter testfile to the cat
Function Description: Tell the shell to remove the eval parameters and re-calculate the contents of the parameters.Syntax: eval [parameter]Supplementary Note: Eval can read a series of parameters and then execute according to the characteristics of
This article mainly introducesShell8 Types of scriptsstringCutTakeThe method summarizes, each method gives the instance code and the operation result, at a glance, the need friend can refer to the nextstring truncation of Linux is useful. There are
This could be a disk detection error, especially after an unsecured shutdown or a damaged disk.Workaround:1. When selecting the startup item, select the first item, such as:Ubuntu 8.04kernl.2.6.22-16-generic2, press E to enter the editing state, in
Variable Description:$$ The PID of the shell itself (Pro CESSID) $! PID of the last background process run by the shell $? End code of the last command run (return value) $- Flag list set with the SET command $* All parameter lists.
First, the demand original file a for 1.7g file, with 5 1700 Mangyo look. There are also 2 auxiliary files b and C, b c files are only 2 column. a1 and b1 same, A2 and C1 a1 B2, c2" a4 a5, the target file is named d.txtSecond,
Bash Script Programming:Variable: variable nameArray: Contiguous number of independent memory spaces, each memory space equivalent to a variable;Element: array name [index]Bash 4.0+Traditional arrays: Indexed as numbers, numbering starting from
When the shell executes a command, it returns a return value that is saved in the shell variable $? In When $? = = 0 o'clock, indicating successful execution; = = 1 o'clock, which indicates that the execution failed. www.2cto.com Sometimes the
Today I suddenly wondered how many lines of code I had written recently, and then I used the shell to figure out the most recent code: ?
1
Find/home/chengshuguang/mango-maxdepth 1-name ' *.c '-or-name ' *.cpp '-or-name ' *.h ' |
Condition test Type in Bash script: integer testString testFile testExpressions for conditional tests: [Expression][[expression]] expression must have a space before and after itinteger test :-eq: Tests whether two integers are equal and equal to
1. If while command is written in one lineWhile read a b;do echo $a $b;d one 12 13 14Cat Aa.txt12 13 14if [[$i-eq 0 | | $i-eq 2]]; then env=10.79.40.146:80; else env=10.79.40.147:80; Fi2. Awk merges two filesAccount CdrCat AccountZhang San
#!/bin/bashdeclare var="XXX" #without space and use one =#1.judge Whether the assignment statement returns trueEcho"----------------------test Assignment in bracket--------------------------------"[var="yyyy"] && Echo"Success"Echo"End" #Success["$
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
1, the variable with = assigned value when the left cannot have spaces. For example , UserName =nihao returns userName: Command not found . Because this place username as a command to deal with. The right approach is to Username=nihao.Careful is the
The 1 script is as follows[[email protected] ~]# vim 99.sh #!/bin/bash # 9*9 Table # 2015.5.26 by Luzhi for i ' {1..9}do for J ' {1..9} do If [$j-le $i] then c=$ (($i * $j)) ECHO-E-n "$j * $i = $c \ T" fi do echo "" Done2 Operating effect650)
1. How can I redirect the standard output and error output to the same location at the same time?There are two ways to achieve this:Method One: 2>&1# Ls/usr/share/doc > Out.file 2>&1The implication is that if a file exists, the result is output to
In Linux, if the file name is enclosed in parentheses, the parentheses should be processed first, preceded by "\" before "(" and ")". Bracket_handle gives the processing method:Sub Bracket_handle {My ($tmp _name) = @_;$tmp _name =~ s/\ (/\\\ (/g; # (
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.