Shell scripting Exercises (12.11)

For an even number of 100 or lessIdea: 1. Define a variable x firstThe range of 2.x is 0-50,x with an initial value of 13. And the value initial value is 0, each time the loop and the value is equal to itself +2*iMethod One:Vim

Initial shell, set SELinux parameters

Turning off SELinux should be replaced with user input variables, but that's fine.==========================================#! Bin/bashClearecho "--------------------"Echo-e "\033[34mthis file controls the state of SELinux on the system.\033[0m"Echo-

Jenkins+git+maven+shell implementation of Project one-click Release

First, prefaceAs is known to all, Jenkins can implement project updates by default (via SVN, but our company uses git), and projects are released through (Maven plugin), but in this case under some containers (such as Tomcat), The JVM will report

Jenkins+git+maven+shell implementation of Project one-click Release

First, prefaceAs is known to all, Jenkins can implement project updates by default (via SVN, but our company uses git), and projects are released through (Maven plugin), but in this case under some containers (such as Tomcat), The JVM will report

Shell script, the begin explanation in awk.

Explain:begin{} The most common use of this particular pattern is variable assignment. Begin this pattern is when the file does not begin to read.awk ' begin{fs= ': "; ofs="-"}{nf+=0}1", corresponding processing is 1:2:3---------> read the input

Linux Service Shell environment variable path setting (CentOS)

Methods for modifying the path path of environment variables under the CentOS systemThe essential part of the computer's brain is the operating system. And the development of Linux is very rapid, there is a trend to overtake Microsoft. This article

Qualified Linux OPS personnel will be the 30-channel shell programming surface questions and explanations

Super depth of the shell advanced programming practice, as of the current Shell programming courses in the domestic training institutions The most fine courses, do not believe in the level of students to see the performance. course cows are not

Linux Shell Data redirection

The common input and output operators under the Linux shell are:1. Standard input (stdin): code 0, using 2. Standard output (STDOUT): Code 1, using > or >>/dev/stdout,/PROC/SELF/FD/1 1 for:/dev/stdout3. Standard error Output (STDERR): Code 2, using 2

What the shell is, preliminary knowledge of various shells, suitable for beginners

What's the shell? What's the use? I believe this is a question most people have had with the shell. Below is a small series for everyone to explain their own explanations, I hope to be helpful to everyone.What is a shell?The shell is a shell of the

Two. Unit sixth. Shell script commands

########################## #二. Unit sixth. Shell Script Command # # # # ##########################1.diffdiff File File1 # #比较两个文件的不同-C # #显示周围的行-U # #按照一定格式统一输出生成补丁-R # #比较两个目录中文件的不同Patch File File.path # #打补丁-B # #备份原文件2.grepgrep Key Character File

Shell Scripting Practices

Common shell scripting use cases, from the online reference and after the modification of the work, in addition to the wiki in the company to write records, it is necessary for a blog to record a drop.Combat Problem 1:Use the For loop to create a

Shell script to handle Nginx site logs

In the Nginx site, access and error are using the default log format, with the log file named as follows:Www.xxxx.com.access.logWww.xxxx.com.error.logThe script processes the previous day's log records, re-places the logs in compressed files, and

Server-side view of log shell script

The server side looks at the log shell script (where path1 and path2 are replaced with the path feature name, and the path followed by "Tail-f" is replaced with the log file path for the path feature name):#! /bin/SH#Check log.Echo "which path

Linux Learning Diary-shell script Basics

In the daily maintenance of Linux, Shell script is one of the essential daily management, its role is to solve the automatic maintenance of the server, reduce the workload of the Administrator, if you want to improve the speed of writing shell

How the shell reads each line of the file

1. Read a row of data using the Read commandWhile read Mylinedo echo "line:" $mylinedone 2. Read a row of data using the Read commandCat Datafile.txt | While read Mylinedo echo "line:" $mylinedone3. #读取一行数据Cat Datafile.txt | While myline=$ (line)

Installing the virtual machine shell script

Installing the virtual machine shell script650) this.width=650; "title=" screenshot from 2016-10-19 13_18_47.png "style=" Float:none; "src=" http://s4.51cto.com/

Awk's shell quickly modifies file names

Scenario: Fake tune There are several files like this in your directory1.jpg?v=12.jpg?v=23.jpg?v=34.jpg?v=4What if the v=x of the file is removed?Method One: Direct write command implementation using AWK shell command implementationls | awk ' {split

Shell Problem Solving

If you want to find common commands, please click on the imageThe instructions in the shell script, in the uncertain case, do not arbitrarily use nohup, otherwise it may have disastrous consequences, such as-memory explosionShell random function

Parameter references in the shell

Reference parameters Describe 0,1,2. Positional parameters. Start with the parameter 0. The parameter 0 references the name of the Startup bash program, and if the function runs in the shell script, the name of the shell

Empty Shell Mail

Empty Shell end:Vim/etc/named.rfc1912.zonescd/var/named/cp-p westos.com.zone Westos.org.zoneVim Westos.orf.zone650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/8B/4C/wKiom1hJAw3QQXmuAABg2u1TR8g913.png-wh_500x0-wm_3 -wmp_4-s_254782645.png

Total Pages: 541 1 .... 462 463 464 465 466 .... 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.