echo display in script with color display, echo display with color, need to use parameter-EThe format is as follows: Echo-e "\033[word background color; text color m string \033[0m"For example: Echo-e "\033[41;36m something here \033[0m" where 41 of
This article references: Shell Scripting Learning GuideThis article reads as follows: Know the shell directive, but do not know how to complete an automated shell script.Because when editing this article, the author is also a novice. So, in some
This article references: Shell Scripting Learning GuideThis article reads as follows: Know the shell directive, but do not know how to complete an automated shell script.Because when editing this article, the author is also a novice. So, in some
Login Host:
Native Login (7 interface Tty1~tty7)
Text Interface (TTY1~TTY6)
Graphical Interface (TTY7)
Telnet
wildcard characters:
*: Represents an arbitrary string, which can be an empty string
①if-elif-elif-else-fiIf-fi' if ($a >); then echo $a; fi ' or ' if [$a-gt];then echo $a; Fi 'If-else-fi' if ($a =), then echo $a; else echo 30;fi ' or ' if [$a-eq];then echo $a; else echo 30;fi 'If-elif-elif-else-fi' if ($a >) && (($a =)); then echo $
Before I published "Hadoop, kill chicken with sledgehammer, Python+shell to achieve the general log file query, statistics , "theneed to combine python, there may be a certain threshold, now the shell part stripping out. For example, some of the
1. SearchGREP-LR YHB./Indicates that all files in the current directory, including sub-files, are searched for the YHB character, and the file name is printed. If there is no-l, the searched rows will be printed out.2. Display the number of rowsNL
① managing LinuxW View the current system load/proc/cpuinfo Saving server CPU related informationGrep-c ' processor '/proc/cpuinfo Compute server CPU CountVmstats Monitoring System StatusTop Displays the system resources that the process occupiesSAR
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
The Cut command extracts text columns from a text file or text stream.Cut grammar[[email protected] ~]# cut-d ' delimited characters '-f fields [[email protected] ~]# cut-c character range Options and Parameters:-D: followed by delimited characters.
Shell First lesson study notes
What do you mean shell?The shell is a command interpreter that, at the outermost layer of the operating system, is responsible for directly talking to the user, explaining the commands entered by the user to
Today, when running the shell script, the pin report is wrong as follows: -bash:./month_web_user_rc.sh:/bin/bash^m:bad interpreter:no such file or directoryThe cause of the problem and the solution are as follows: (excerpt from esther0401)One of
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
Long time no shell, hehe#!/usr/bin/EnvBashcounter=1 while[$COUNTER-lt + ]; DoEchoThe counter is $COUNTERCat>Tmp.sqlinsert into"Wcdata"VALUES ('' (printf "%03d" $COUNTER) '','0.00','0.00','0.00183','85.47943','4773267.7216','-10669.18'); EOFEchoThe
How to use the ①$ notation: (Excerpt from-network)The execution name of this program$n the nth parameter value of this program, n=1..9$* all parameters of this program, this option can have more than 9 parameters.$# the number of parameters for this
[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
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
Linux shell reads files by row,One way is to use cat and reverse quotation marks.
Ps: reverse quotation marks play the role of command replacement in Linux. Command replacement means that shell can insert the standard output of a command to any
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.