Linux Shell Basics (vi)

bz2

12. Sort commands for Rowssort:1. Sort command-line options: Options Describe -T Separators between fields -F Ignore case when sorting based on character -K Define

Linux Shell Basics (ii)

Seven. grep family: 1. grep exit Status: 0: Indicates success; 1: Indicates that a matching pattern could not be found in the supplied file; 2: Indicates that the file provided in the parameter does not exist. See the example below: /> grep '

Linux/mac/shell Common Commands

Common commands· LS View the files in the current directory· CD into a directory· CD-Jump back to previous directory· CD ~ Enter the current user's personal directory· PWD Output Current path· mkdir new Folder· Touch New File· Find File· ln

Shell script extracts a specified number of random students

#!/bin/bash##!/bin/bash#read-p ' input number ' C #指定抽取的学生人 Number of jw= (' Wang Hao ' Shei Yunsheng ' ke Yang ' He Shingyu ' Repeti soldier ' Dengbellin ' ' Liu Dao ' ' Yang Jidong ' Chu Ziwen ' ' ' Salted fish ' ' Yang Dong ' > Huang Tinghui '

Shell condition Test Statement three methods

1, test-f file 2, [-F file] 3, [[-F file]][-F file1-a-F file2] logic with [-f file1-o-F file2] logic or [-f file1] && [-f file2] the same as a string operation best double quotes such as-n-z = = = And a space is added to both sides of the equals

Shell Scripting Lesson II ·

The shell file containsThe shell can also contain external scripts in the following syntax format:. FileNameOrSOURCE filenameFor example, create a two shell script.Script 1:test1.sh url = "Www.baidu.com" Script 2:test2.sh .

CentOS 7 expect + Shell implementation batch file creation

The problem has been a long time, and has not been sorted out. Remember the last interview when asked how to bulk modify the host name of 1000 machines. Here is a file named 1.txt that is created in bulk for hello.First, install the expectYum

Operator of Shell programming

Declare declaring variable type declare [+/-] [option] Variable name-: Set the type attribute to the variable +: cancels the Type property of the variable-A: Declaring variables as arrays-I: declaring variables as integers-x: Declaring a variable as

"Linux rookie 2" Shell Base command

Diffdiff file File1 to compare two different files-C display rows around the top and bottom-U uniformly output patches in a certain format-R comparison of files in two directoriesPatch File File.path Patching-B Plus-B backup source filesgrepgrep Key

8 ways to intercept shell script strings

Tag: The shell operator represents the deletion of the first character net article BSP comSuppose there is a variable var=http://www.aaa.com/123.htm.1. # Intercept, delete the left character, leave the right character.Echo ${var#*//}where Var is the

Let and expr shell operations compare let's win

Integer operations in shell scripts are generally implemented by the two instructions of let and expr, such as the variable s plus 1 can be written: let "s = $s + 1" or s= ' expr $s + 1 'The two are not easy to write, but the performance of the

Duplicate files with the same deleted contents as shell scripts

#!/bin/bash#! Delete duplicate files with identical contentsLs-ls--time-style=long-iso | awk ' begin{Getline;getline;Name1=$8;size=$5}{name2=$8;if (size==$5){"Md5sum" name1 | getline;csum1=$1;"Md5sum" name2 | getline;csum2=$2;if (csum1==csum2){Print

Shell Note 4

Metacharacters and descriptions commonly used in regular expressions Metacharacters Symbol name Description \ Back slash Escape character | Pipeline Or []

Linux+shell obtaining and copying the latest backup data

Linux+shell obtaining and copying the latest backup dataBefore we introduced some script configuration, today we introduce, using shell script How to copy the most recent files in the specified directory to the specified directory, we copy the files

Viewing and deleting variables in the shell

Tag: set command; unset commandFor example: There are now two user-defined variablesName= "Andy Lau"Age=20The set command is used to view variables650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/87/EF/wKioL1fkk0CQqSUwAADT1GLzRuI190.png-wh_

Shell Display with color font

Format: echo "/033[word background color; font color m string/033[control code"If you simply display the font color can be fixed control code bit 0m.Format: echo "/033[word background color; font Color m string/033[0m"Word background color range: 40-

Run shell scripts every 30 seconds

cd/usr/local/sbin///Store shell script directory.Vim guoguosql.sh//Run a PHP file every 30 seconds. File path is vim/home/wwwroot/www/domain/huitiao/web/sql.php#! /bin/bashand do Curl http://127.0.0.1:82/sql.php sleep -DoneSh/usr/local/

Shell Script Planning Templates

Shell Script Planning TemplatesIn Linux operations, shell scripts are indispensable tools, but each operator programming habits are different, many times is to implement a function, written out of the script is rotten seven or eight bad.Scripts must

Shell Programming-Initial

Programming languages are generally divided into static languages and dynamic languages.Static language: Compiled language strongly typed (variable) pre-compiledExample: C C + + Java C #Dynamic language: Interpreted language weak type (default

Hill sort (shell) theory---does not contain source code

|  Copyright Notice: This article for Bo Master original article, without Bo Master permission not reproduced.Hill sort, is a narrowing incremental sort. It is sorted according to the step size, different steps may produce different sequences, but

Total Pages: 541 1 .... 351 352 353 354 355 .... 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.