Shell with color output

Here is a record of how the shell script can be color-output, using a bit in Python also applies.echo Display in shell script with color display, echo display with color, need to use parameter-EThe format is as follows:Echo-e "\033[word background

Shell Cut Log Script

Vi/etc/logrotate.d/nginx #编辑脚本/usr/local/nginx/logs/*.log/usr/local/nginx/logs/nginx_logs/*.log{Missingok # ignores errors, such as "log file cannot be found" error message. Dateext # The log file after the switch is appended with the date of the

Write your own shell command ls-r1ff

The R-parameters of the LS command represent a recursive listing of all the files in all subdirectories, and 1 means that each row shows only one file or directory, and F means that the output is not sorted. F represents the end of each item's

Use shell scripts to simply simulate simultaneous read and write operations to specific files

Use shell scripts to simply simulate simultaneous read and write operations to specific filesFormat of file contents:Field1, Field2, field3, Field4As a delimiter, but there are spaces. The script uses the following:

Shell learns 32 days----read reads a row

Standard input and output with standard error outputStandard input/The output is probably the most important concept in the design principles of software tools..His idea was to:The program should have a data source,Data Export(where are the data

Linux Bash Shell detailed

First, Bash shell overview1. What is BashBASH is the abbreviation for the Bourne Again Shell, developed from the SH-unix system, and is a tool for users to interact with the Linux kernel, using the bash operation kernel to complete the system's use

Shell Road--lamp Install Yum version with one click

#!/bin/bashCat # Auto Install lamp env# by author Max# 2017-03-20Eofapache_soft= "HTTPd httpd-devel"mysql_soft= "Mariadb-server mariadb mariadb-devel"php_soft= "PHP php-mysql php-devel"ip= ' ifconfig eno16777736|grep 192|awk ' {print $} ' |sed '

Function of shell script programming

Functions: functionProgram Programming: Code ReuseModular programmingStructured programmingThe code of an independent function as a whole, and a name for it; a named code snippet, which is a function;Note: The code snippet that defines the function

Using Shell to develop a springboard function script case

First set a small goal, first proficient in the shell say! --OLD boyUseShelldeveloping a Springboard function script caseexample 17_6: Developing an Enterprise-class Shell springboard machine case. Requiring a user to log on to a springboard machine

shell-grep-sed Common usage

grep-a digital search to show the next line of information650) this.width=650; "height=" 290 "src=" http://b176.photo.store.qq.com/psb?/81c1194a-ff39-4e50-b1b1-40057b06260f/

Shell's Find command detailed

Note: ". "There are spaces around the dot number.1. Find-name "*.txt"Find the file that ends with txt in the current directory (and subdirectory).2. Find-name "[a-z]*"Find the file that starts with all letters under the current directory (and

Day10.awk command and scripting of the shell

Homework One: awk, the collation of variablesawk Syntax:-F defines the field delimiter, and the default delimiter is a contiguous space or tabUse the order of $1,$2,$3 to represent the different fields of each row in files separated by the interval

Shell basic Syntax (i)

Homework One: Organize your blog with awk, variables, operators, if multiple branchesJob Two: awk text processing1, print the UID within the scope of 30~40 user name[Email protected] ~]# awk-f: ' $3>=30 && $32. Print the line number and user name of

Shell command-line shortcut keys

In the shell command terminal, CTRL + N equals the direction-down direction key, ctrl+p the direction key that corresponds to the direction.   in the command terminal through them or the arrow keys can be used to quickly find the history command.

A bug in the shell script that defines the PATH variable

===========================================================================if define a PATH variable in a statement the path that raised the command bug where path change occurs problem Original script file: INotify +rsync Live Sharing

The first column of the shell is judged as duplicates, and only one of the data is taken.

For example 123456.txt content is as follows90115601,2137786735 3668490115601,2137786735 3668490118301,17751822 3489890145133,2050186877 384790145133,2050186877 384790151825,3580430507 3797490151825,3580430507 3797490188754,2987861307 2453390188754,2

Shell Note 2

1.Linux default shell is bash,unix default shell is shBash is fully compatible with SH2. Define variables:When defining a variable, the variable name does not have a dollar sign ($), and a variable is used before the variable name plus $There can be

Linux Jobs (iii)-shell statistics The most frequently occurring n words in an article and sorts the number of output occurrences

Linux classes on the assignment Wednesday, if there is a poor consideration to the place, please do not hesitate to enlighten.Shell Processing Text See this blog for related frequently used commands##假设输入两个參数 is the first to count the number of

Array of shell script programming

Variable: Stores the memory space of a single element;Array: A contiguous memory space that stores multiple elements;Array name: The entire array has only one name;Array index: numbering starting from 0;Array name

How Linux automatically generates arrays from 1 to 100 in the shell

Before writing a shell script, you need to automatically create 1-100 of the text without knowing how to create it. Baidu finally know the way to create.There are a lot of ways to create 1-100 in a shell script, so I'll say two easy-to-understand

Total Pages: 541 1 .... 322 323 324 325 326 .... 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.