Settings for Shell script colors

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

The shell of Linux learning notes

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

Linux Learning Note Shell (ii)--Automation script

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

Shell theory Learning (I.)

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

Syntax knowledge of shell scripts--Process Control

①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 $

Common log statistics methods in the Shell

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

Common shell commands

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

Syntax knowledge for shell Scripts 3

① 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

Shell--SED usage

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

Shell-cut usage

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

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

Problems with writing shell scripts

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

Shell--shift usage

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

Post a shell code

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

Shell IFS readline.sh

Processline () {line= "[email protected]" echo $line} file= "" if ["] = = =" "]; Then file= "/dev/stdin" Else file= "$" if [!-f $FILE]; then echo "$FILE: does not exists" exit 1 elif [!-R $FILE]; Then Echo '

Syntax knowledge for shell scripts 1

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

Linux Learning Shell script-------references and operators

[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

Shell's scripting Exercises

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 SHC

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,

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

Total Pages: 541 1 .... 386 387 388 389 390 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.