Set to white on black backgroundEcho-e "/033[037;40m"Color is selected by adding a dedicated sequence-basically a numeric value sandwiched between "/e[" and "M". If more than one numeric code is specified, separate them with semicolons.Echo-e "/e[31;
Sed is a good file processing tool, itself is a pipe command, mainly in the behavior of the unit processing, you can replace the data rows, delete, add, select and other specific work, the following first understand the use of SEDThe SED command
Shift is a very useful command in UNIX. You can move the command parameter to the left so that the command parameter position in the script is not changed, and all parameters are traversed in turn.As Shift 3 indicates that the original $4 now become
#数字段形式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
[This is my own study notes, welcome reprint, but please specify the source:http://blog.csdn.net/jesson20121020]
Variables and substitution operations, one of the easiest mistakes to make when performing variable substitution in a script is to
make a demand flow chart requirement Analysis-Program Design-specific implementation of training pointssed,Echo, Test,if, while,Shift1. Demand Analysis: Practice Test-d Scheme design: reflect the idea, first define a variable, with the conditions to
[This is my own study notes, welcome reprint, but please specify the source:http://blog.csdn.net/jesson20121020]
Shell Script basic elements:#!/bin/bash ---First line # ---comment variable flow control structureLook at a simple example,
If you need to modify the default shell (typically the bash shell), use it handy. Check the shell types available for your system first[email protected] ~]$ chsh-l/bin/sh/bin/bash/sbin/nologin/bin/tcsh/bin/csh/bin/kshModify the current shell[email
installation and use of the Shell encryption tool SHC1) Tool DescriptionShell scripts are read-write and are likely to leak sensitive information, such as username/password/path/IP. It also leaks sensitive information while the shell script is
Update the local code to the server shell scriptThe first problem with Ubuntu as a development machine OS is to put the updated code on the test server to runWww.ahlinux.comBefore using Windows with WINSCP Update code to the server upThere are no
This is the automatic landing SSH script I wrote in St, divided into two filesFile 1:sssh#!/bin/bash#xql 2011/01/4#auto SSH 138.198.230.170Case$Inch "Xql")Sssh.exp XQL ;; "Root")Sssh.exp Root ;; "31" ) SSH [ Email protected]10. 80.117. ; "40" )
One, variableVariables in the shell are divided into: local variables, environment variables, positional parameters;Local variables: Variables that can only be used in scripts for the user's current shell lifetime, local variables are invalidated as
The Shell is process-oriented(Bash for example)Variables are process variables, process ends, and variables disappear.Bash Variable type:Environment variablesLocal variables (local variables):Positional variablesSpecial variablesLocal variables: Set
A shell is a program that has a special function that can be understood as an interface that users interact with the kernel. We know that the kernel is the heart of Linux, and the kernel is switched on and left in memory when it is turned on. Other
Record command history: The commands we've knocked on, Linux will have a record, saved in the. bash_history file in your home directory. (Note: The current command will be saved in the. bash_history file only if the user exits the current shell
I. BACKGROUNDToday, suddenly found that the latest news thumbnails on the mobile client are not displayed, on the server looked at,Discover that new news images do not generate thumbnails at all.This set of news release system is very old program,
Blog home: http://blog.csdn.net/minna_d1. Calculate the string length:echo ${#str}2. Truncate the string by character:${word:begin:length}3. With%, percent, #, # #对字符串的切割:%: Right-to-left non-greedy matchPercent: greedy match from right to left#: No
1. Calculate the length of the array:${#array [@]}2. List the array index:${!array[*]} or ${!array[@]}3. Print all the values in the array:${array[*]} or ${array[@]}Iterate through the array elements in 4.shell:For STR in ${array[@]};DoEcho
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