(027) The Shell branch if statement for Linux

Fundamentals of the ten-year OPS series-LinuxZeng LinContact: [Email protected]Website: www.jplatformx.comCopyright: Please do not reprint the article without permission first, use the IF statementThrough the shell, we can write a shell script

The difference between printf and echo in a Linux shell

EchoEcho is a very common shell command. The parameters are as follows: -e: Turns on parsing of backslash character backslash-escaped, that is, parsing characters such as/n,/t, rather than two characters -E: Turn off parsing of

Installation and use of mac-zsh--ultimate shell

Foreword: Zsh can be configured strong, user can customize the configuration, personalization is strong. Zsh Tab Completion is more powerful, this feature allows us to save a lot of time. Zsh also has the code highlighting function, makes the code

Linux Shell Advanced Programming Tips 1---in-depth discussion (awk, <<)

1. In-depth discussion (awk, 1.1. In-depth discussion of awkRecords and fields, patterns and actions, regular expressions and meta-charactersThe basic tutorial has introducedConditional and logical operators>= greater than or equal to= = equals! =

Shell Mini-Version Monitoring script

wrote a Shell version Mini monitoring scripts, purely to share with you the study , be interested in learning Shell can look down. (*_*)Total 3 a script file service.sh, daemon.sh, tcp.shImplemented a number of basic functions: port monitoring,

"Pit" of automatic implicit type conversion in Shell, AWK

1. Questions: in a variety of programming languages, the weak type of language is quite a lot, on the one hand this "dynamic type" is very convenient to use, while on the other hand, "pit" you do not discuss ~ Common SQL, Shell, AWK will encounter

Linux shell String Operations (length, find, replace) detailed

String-related operations are often involved in the shell batch process. There are a lot of command statements, such as: awk,sed can do string various operations. In fact, the shell built a series of operating symbols, you can achieve similar

Shell Scripting Learning 19 shell while loop

The while loop is used to continuously execute a series of commands and to read data from the input file; the command is usually a test condition. The format is:While Commanddo Statement (s) to being executed if command is TruedoneThe command

Func && Operation_yes | | Operation_no (Shell)

by &&, | | Understand the function return values in the shell.I want to implement the following functions:Write a function that determines whether a string contains only numbers, and returns the corresponding flag (yes/no);By calling the function

View the currently used shell

PS |  grep $$ | awk ' {print $4} 'PS command without parameters displays the status of the process associated with the current terminal$$ variable stores the PID of the current processPS Fourth column is the command used by the process, if it is a

Use shell scripts to slice task_list and execute separate scripts

1#/bin/SH2 3task_list=$14Len= 'WC-L $TASK _list |awk '{print $}'`5 6 #noExce () {7 sed-N'1,'$ (((len/5) ))'P'$TASK _list > $TASK _list'Task_list1'8 sed-N"'$ (((len/5)*1+1))','$ (((len/5)*2))'P'$TASK _list > $TASK _list'Task_list2'9 sed-N"'$ (((len/5)

Linux command--bash Shell configuration

I. Type of shellIn terms of user login, the shell type is:1. Login Shell: (read environment configuration)Log in normally via a terminal:Su-usernameSu-l USERNAME2, non-logon shell: (do not read the environment configuration)Su USERNAMECommand window

Hadoop Learning for the fifth time: HDFs shell command

Tag:ar    use    sp    file    div   art    bs   ad   ef    The call file system (FS) shell command should use the form Bin/hadoop FS. All FS shell commands use the URI path as the parameter. The URI format is Scheme://authority/path. The scheme for

Shell script extracts files recursively from folders

DemandThe first two days encountered the need to extract files in a folder of about 10 levels, and then wrote this script.A file structure such as the following: Dir1 ├──a │ ├──b │ │ └──file1 │ └──file2 ├──c │ └──d │

Shell modified file name (a)

If the file name is: Time_filename.txt changed to Filename_time.txt. For example 20111111_me.txt change to me_201111111.txt how to modify?1#! /bin/SH2 forEachfileinch`ls-B '3 Do4Filename=${eachfile%. txt}5Filehead= 'Echo$filename |awk-F _'{print $}

Shell Script-translating English words

I've been learning Linux and shell scripts lately. English has not been returned to teachers for many years. Encountered the words do not understand to open a Word bully Web dictionary to translate, a long time more uncomfortable. Accidentally found

<linux command, editor and Shell Programming > Commands Section reading notes

Ctrl+u can delete rows under the shell, if this key doesn't work, try Ctrl+xCTRL + Z You can suspend a program without terminating the program, but you can suspend the program.This job can then be switched to the foreground by the FG commandCP

Linux shell mac address conversion convert with sed, convertsed

Linux shell mac address conversion convert with sed, convertsed Convert 0024. b20b. 693f address to 00: 24: b2: 0b: 69: 3f 1. Separated by dots [Root @ hzswtb2-mpc ~] # Echo "0024. b20b. 693f "| sed-r's/\ B (..) (..) \ B/\ 1: \ 2/g; s /\. /:/G'00:

Very powerful shell-written Tetris

Very powerful shell-written Tetris On the Internet, you can see a Russian box written using linux shell scripts. It is the most awesome shell I have ever written. Share. The original author information is included in the comments of the script. :

Use an automated shell script to find detailed thread information for CPU usage

Use an automated shell script to find detailed thread information for CPU usage After some interceptor code is added to the project, the CPU alarm shows that the CPU usage exceeds 100%; If you want to find out which code consumes too much resources,

Total Pages: 541 1 .... 188 189 190 191 192 .... 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.