Shell script implementation polling to see if the process is over

Functional Requirements:A shell script, in order to use a multi-process, to start more than 10 background running programs, in order to prevent the script than the background process prematurely end caused unpredictable impact, now to determine

Run scripts in different ways in the shell

In the shell, you can run the script in 3 ways:1. ./script_name or source./script_name2 Direct./script_name3./script_name &Join script Script_name There are two command command1,command2, then, when run in the first way, Command1 and Command2 both

The type command in the shell

Type [-AFTPP] name [name,...]-A prints all possible cases of name, such as Type-a ls, which will print LS is aliased to ' ls--color=auto ' and LS is/bin/ls-F does not go to find function-T Print alias,keyword,function,built-in,file these 5 types-P

Shell One-click View Linux hardware configuration

I took over two projects, suddenly the eldest brother asked me what configuration of the server, then I was ignorant, has not been too concerned about this thing, just to ensure that the server normal operation, the site can access normal, the other

Execution flow of commands in the shell

In the shell, a command is written in 3:1 can write directly (Normal Command)2 can be placed in double quotation marks ("Command")3 can be placed in single quotes (' Comand ')In this 3, the execution flow of the command is not the same, as shown

[Shell Foundation]--sort Command

Sort commandSort is output in ascending order of ASCII code, and is compared sequentially from the first characterCommon options-C test file is already sorted-R Reverse Sort-N Sort by numeric numeric size-t Specifies the separator-K Specify Domain-U

Shell Set Understanding

In the load-spark-env.sh script below the spark bin , there are the following statements: If [-F "${user_conf_dir}/spark-env.sh"]; Then # Promote all variable declarations to environment (exported) variables set-a . "${user_conf_dir}/spark-

Shell condition Test

The shell condition test can be done in two ways:Test parameters Testing Content[Parameter test content]First, test file type:TEST-E file name (test file exists)[-e FileName] Test file exists, note the space on both sides of the bracketTest-f file

The shell of HDFs

The call file system (FS) shell command should use the form $HADOOP _home/bin/hadoop FS.All FS shell commands use the URI path as the parameter.The URI format is Scheme://authority/path.The scheme for Hdfs,hdfs is HDFs, such as Hdfs://localhost:9000/

Linux Shell Basic Command

Learning basic Linux Commands Command Description $ ls This command was used to check the contents ofThe directory. $ pwd This command was used to check the presentWorking directory.

Shell Simple Usage Notes

One, the main use of the Bash Shell in Linux; View the supported shell types available on Linux systems :Vim/etc/shellThe way to perform shel footsteps:1. Give footsteps the ability to execute permissions and invoke the script using a relative or

Shell quickly migrates massive files

Business requirements: the need to migrate 1000多万个 files from one directory to a remote machineIdea: Use wget to move the file one after another, because the number of files is relatively large, if a bit in the loop operation, it will be very slow.

Shell contains all the decompressed functions

bz2

#!/bin/sh ()  {        if [ -f $1 ];then                 case $1 in                    *.TAR.BZ2)       tar xjf $1       ;;                          *.tar.gz)        tar xzf $1       ;;                    *.BZ2)           bunzip2  $1      ;;         

Shell---grep command detailed

First, grep ----"Line filter Tool" grep (Global search Regular expression (RE) and print out of the line, fully search regular expressions and Printing a line is a powerful text-search tool that can use regular expressions to search for text,

Shell Small Script

Ask for 1-100 and A. Non-recursive1 #!/bin/bash 2 sum=0 3 str= "" 4 for I in {1..100} 5 does 6 let sum+=i 7 str+= "$i +" 8 done 9 echo ${str%+}= $sumOutput Result:650) this.width=650; "src="

The grep tool under the shell

One. grepgrep (Globally search a Regular Expression and Print) is a powerful text search tool , it can use regular expressions to search for text, print matching rows, but does not affect the contents of the original file , and by the return value

[Shell base]--variable

Assigning values to variables#定义变量, note that there is no space on either side of the equal sign variable=#定义环境变量Export variable=#双引号: Can contain spaces, can escape special characters variable="" #$ () or anti-quote: assigns a command

To intercept a string in a shell script

1. Remove the left character and leave the right character1). Use # InterceptExample: str= "http://www.baidu.com"650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/82/DC/wKioL1djQu_CLXeEAAAzIuXnc10469.png-wh_500x0-wm_3

String interception under Shell

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/82/E0/wKioL1djmxjx5LUrAACG8N3z-pA754.png "style=" float: none; "title=" 0.png "alt=" Wkiol1djmxjx5luraacg8n3z-pa754.png "/>The maximum, minimum, and average values of a set of numbers are

4.7 Hill (Shell) sorting method

4-7 shellsort.c1#include 2#include"4-1 createdata.c" //function to generate random numbers3 #defineArraylen 10//number of data elements that need to be sorted4 voidShellsort (intA[],intN//Hill Sort5 {6 intd,i,j,x;7d=n/2;8

Total Pages: 541 1 .... 465 466 467 468 469 .... 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.