Shell Script Foundation Advanced (i)----shell introduction

Shell Introductionbash programming, then start with the programming, What is the program first? Personal words Explanation: program is the process of processing data. So, The program design consists of : program = data structure +

A simple script that automatically creates shell scripts

Because I usually write some small experimental script, every time to write author,description and so very troublesome, then wrote such a script can create their own small script, code as follows, pure personal original, relatively rough, big God

Shell's "test" command

Read Catalogue Numerical test File test String test The test command in the shell is used to check if a condition is true, and it can be tested in three ways, such as numeric values, files, and characters.

[Shell] Regular expressions and wildcard characters

-------------------------------------------------------------------------------------Regular expressions and wildcard characters:1. The regular expression is used to match the qualifying string in the file , and the Regex contains the match . grep,

Linux:shell Common wildcard characters

character meaning * Match 0 or more characters ? Match any one character [list] Match any single character in the list [!list] Matches a character other

September 13, 2015 Course assignments-Questions about the shell

1. Describe the operation principle of shell program (can be attached with necessary graphic instructions);   Span style= " font-size:12px;">shell is a special program that is officially defined as the interface to the kernel and is

A random choice at noon where to eat the script, no big use ... Skilled in the use of the shell, welcome to vomit Groove ...

Tag:shell    function     menu print     [[email protected] scripts]# cat menu.sh #!/bin/bash################################# ## filename: menu.sh# describe: choose a place to eat# author:  lijun# create date: 2015-09-09# version: 1.0##############

Shell 99 Multiplication Table

#!/bin/bashfor I in {1..9}dofor j in ' seq 1 $i ' dom= ' echo "$i" "*" "$j" |bc ' Echo-n "$j" x "$i" = "$m" "" Doneecho "" DoneExecution Result:[Email protected] shell]#./99.sh1 x 1 = 11 x 2 = 2 2 x 2 = 41 x 3 = 3 2 x 3 = 6 3 x 3 = 91 x 4 = 4 2 x 4 =

Jenkins, Ant Ctomcat+shell reported Ant:command not Foun.

#!/bin/sh# Licensed to the Apache software Foundation (ASF) under one or more# Contributor license agreements. See the NOTICE file distributed with# This work for additional information regarding copyright ownership.# The ASF licenses this file to

Linux Shell String Common operations

Take the length of the variable [[Email protected] scripts]# var=oldboy123[[email protected] scripts]# echo  ${var}oldboy123[[email protected] scripts]# echo ${#var}9# For example: #以下判断用read输入一个值, if the length is 0, The value is empty,

Shell Parenthesis Usage Introduction

Medium brackets [ and the test command equivalent, the user Boolean judgment, such as:1 a='abc'2if'abc' ] 3 Then 4 " Yes " 5 Else 6 " No " 7 FiEquivalent to1 if ' ABC ' 2 Then 3 " Yes " 4 Else 5 " No " 6 FiWhen using [], be

Nginx under the log cutting shell

#!/bin/bashMkdir-p/data01/nginx_log/$ (Date +%y%m%d)cp/data01/nginx_log/access.log/data01/nginx_log/$ (date +%y%m%d)/access-$ (date +%y%m%d). log#先复制原来的正常访问日志Cat/dev/null

Nginx under the log cutting shell

#!/bin/bashMkdir-p/data01/nginx_log/$ (Date +%y%m%d)cp/data01/nginx_log/access.log/data01/nginx_log/$ (date +%y%m%d)/access-$ (date +%y%m%d). log#先复制原来的正常访问日志Cat/dev/null

Use shell scripts to detect realserver status in LVS and implement automatic removal of attached hosts

#!/bin/sh# Describe:check the real server status# history:2015-08-25 22:21:38# Author:timPath=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binExport PATHvip=192.168.1.121dip=192.168.1.112rip= ("192.168.1.122" "192.168.1.123")Vport=8

[Shell] Bash variables: Custom variables

/*-------------------------------------------------------------------------------------------@ Black eyed poet --------------------------------------------------------------------------------------------*/A variable is a unit of computer memory

"Shell scripting Exercises" to determine user presence and user type

TopicWrite a script1. Pass a parameter to the script, this parameter is the user name;2. If the user exists, perform the following tasks* If the user's ID number is less than 500, display it as an administrator or system user;* Otherwise, display it

Shell Foundation V: Array Preliminary

First, an array overviewArrays: Data StructuresData series, continuous multiple data, can be used to get related elements of the indexDeclaring an array:declare-e arraynameInitialization assignment:arrayname= ("STRING1" "STRING2" ... )Arrayname=

Shell concurrently executes multithreading

Encounter FTP to more than one machine problem, waiting for the last execution to execute the next, time will be longer, if you can simultaneously send files to multiple machines, you can achieve the purpose of saving time.Grammatical

[Algorithm] Shell sort

Public voidSortint[] list) { intGap = LIST.LENGTH/2; while(1 Gap) { for(inti = gap; i ) { intj = 0; inttemp =List[i]; for(j = i-gap; J >= 0 && temp Gap) {List[j+ Gap] =List[j]; } list[j+ Gap] =temp; } Gap= GAP/2; }}Shell sort,

Multi-thread Linux Shell script and linuxshell

Multi-thread Linux Shell script and linuxshell In bash, we run (&) in the background to implement multithreading. for((i=1;i We have added {} & so that the execution in {} can be performed in the background. The above is equivalent to executing

Total Pages: 541 1 .... 434 435 436 437 438 .... 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.