Basic procedural exercises under the shell

1. Simple progress bar Program650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/82/F2/wKiom1dmiCfizPKcAABUqdm5Mxw224.png-wh_500x0-wm_3 -wmp_4-s_2159390602.png "title=" bar. png "alt=" wkiom1dmicfizpkcaabuqdm5mxw224.png-wh_50 "/>Lable array

"Shell" for loop

#!/bin/bashfor i in 1,3,4,6 # #有几个数就循环几次 does echo $i donefor m in $ (cat/root/num.log) # #/root/num.log a few lines Just loop a few times do echo-e "$m \ n" # #echo-E to recognize "\ n" done  Read-

[Shell Foundation]--echo Command

echo command: Used primarily for output in the shell 1.-N does not wrap the display result (by default, the line is wrapped) 2.-E "" supports using some special characters in double quotesThe usual special characters are\a a warning sound; \b

Linux Shell Process Control

Linux Shell Process Control Guide Unlike the Java, PHP, and other languages, the Linux shell has its own process control statements, including conditional statements (IF), loop statements (for,while), and SELECT statements

Start the ultimate efficiency Shell Tour (2)

Next: Start the ultimate efficiency Shell Tour (1), and then I'll introduce another useful plugin for Oh my zsh:Zsh-autosuggestionsThe function of the plugin is to display the input History command, a very sharp feature!!The configuration method is

Interception of strings in the shell

9 Kinds of interception of strings in shell, take var=http://www.google.com/test/.html as an example(1) Method one: # Intercept, delete the left character, retain the right character.Echo ${var#*//}var is the variable name, and the # is the operator,

Progress bar--shell Script implementation

Progress bar in the future development, testing, operation and maintenance, can be automated inspection project updates, operation and so on, greatly accelerate the efficiency of work.1. Code implementation  1 #!/bin/bash  2 function proc ()   3 {  4

Shell Script Implementation progress bar

Using a shell script to implement a progress barThe code is as follows:650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/82/DC/wKiom1dirnXDvyV1AAA-ATqC6Jg995.png-wh_500x0-wm_3 -wmp_4-s_4061727919.png "title=" progress bar. PNG "alt="

Shell text filtering

Regular expressions Symbol p> meaning . Matches any single character in any ASCII, or letter, or number ^ Match beginning $ Match line end

Shell Text processing-split merge and filtering

Sort classification OperationsSample filesBoys in company c:hk:192:2192alien:hk:119:1982The hill:kl:63:2972aliens:hk:532:4892Star wars:hk:301:4102A Few Good men:kl:445:5851Toy story:hk:239:3972The command format for sort is: Sort-cmu-o output_file

Shell Scripting Learning Record

Special variables Variable Meaning $ File name of the current script $# The number of arguments passed to the script or function. $* All parameters passed to the script

Code for the shell script exercise

Exercise one: Write a simple progress bar with a shell scriptThe code is as follows:650) this.width=650, "title=") ho7oa}6@[z~ @MTZJH2YZ (x.png "src=" http://s3.51cto.com/wyfs02/M00/82/F1/ Wkiom1dmv0nzcwgdaabjd93_rgs506.png "alt="

Shell if judgment

#!/bin/sh/ETC/INIT.D/SNMPD start && >/dev/nullPid= '/ETC/INIT.D/SNMPD status| grep pid ' # '/etc/init.d/mysqld status| grep "not running" to see if the status of the service is healthy with the status stateIf ["$pid" = = ""]; Then

Make your own Linux-->shell

before starting the code, let's take a look at what a shell is. Shell English is also called the shell layer. In a computer, "system" software that "provides user interface", usually refers to the command parser of the command line interface. In

Shell Initial involvement

I. Concept:The shell, commonly known as the shell (used to distinguish it from the kernel), is a command-line interpreter that receives user commands and then invokes the appropriate application. Two. Type of shell:1. SH (Bourne Shell):

Linux Gvim Shell String

#字符串: As the number is the most commonly used type, the other is nothing to use.#字符串可以使用单引号, double quotes, without quotes.#单引号字符串限制:# 1. Any character is output as is, and the variable in single quotation marks is invalid# 2. Single quotes cannot

Jenkind + git + mave + shell + Tomcat

Install the required plug-inEmail Extension Plugin GIT Plugin Publish over SSHInstall MAVEN JDK configuration e-mail triggers and other configuration login keys on a chapter blogNew MAVEN Project650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/

Shell implementation of hive Automation test

This program mainly implements the Hive permission test. The system has the Administrator user single and test user tests. Under Path/home/test/, the pre-condition of the use case is written in the input folder, and each use case corresponds to an

Shell built-in operator-string processing (summary)

First, Judge read the string value An expression meaning ${var} Variable var with the same value as $var ${var-default} If Var is not declared, then use $default

Repairing method of Redhat broken shell bug

cve

Hackers exploit this vulnerability to execute arbitrary code, even without the need for authentication, to remotely gain control of the system, including executing malicious programs, or implanting Trojan horses within the system, or obtaining

Total Pages: 541 1 .... 361 362 363 364 365 .... 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.