To match an IP address with a regular expression in a shell script

This article mainly introduced the shell script to match the IP address through the regular expression, this article directly gives the realization code, needs the friend to be possible to refer to under In the operational dimension scenario, we

Uppercase and lowercase letter conversion shell script code

This article describes a shell script for uppercase and lowercase conversions, learning the use of commands such as TR, awk, and sed. Have a friend in need of reference under The following script allows you to convert directories or file uppercase

Test statements for Linux shell scripts

In the shell script to do a variety of tests frequently, test the format of the statement: (1) Test (2) [ (3) [[ Three kinds of differences, in the third can be a wildcard matching, and &&,| |,, the operator can also be normal presence in [[]],

Some special symbols in the shell script _linux shell

The special symbols commonly used in the shell are listed below: # ; ;; . ,/\ \ ' String ' |! $ ${} $? $$ $* "String\" * * * *? : ^ $# $@ ' command ' {} [] [[]]] (()) || && {Xx,yy,zz,...} ~ ~+ ~-& \\ +-%= = =!= # Well No. (comments)This is

Linux using shell script to implement FTP automatic upload download code summary _linux Shell

1. FTP automatically log in to bulk download files. Copy Code code as follows: # # # # # # # # # #从ftp服务器上的/home/data to local/home/databackup#### #!/bin/bash ftp-nOpen 192.168.1.171 User Guest 123456 Binary Cd/home/data

Linux bulk Backup server configuration files and directories script _linux Shell

Function:1. Only in the backup machine, the remote server only need to allow the backup machine with root through the key login;2. Configure which servers to back up on the backup machine, add or subtract the array in need_backup_servers;3.

3 ways to judge variables as numbers in a shell script _linux shell

Method 1: Add a variable to an integer value by using expr, or an integer if it is performed correctly, or an error is executed, $? will be a value that is non 0 Copy Code code as follows: Expr $args + 0 &>/dev/null Method 2

Shell implementation Multilevel menu system Installation Maintenance script instance sharing _linux Shell

Demo Effect: 1, the first level menu 2, Level two menu 3. Perform operation Script reference: Copy Code code as follows: #!/bin/bash #author Lic (Oldboy Linux student) #date 1304 disk_no= "/DEV/SDA1" Nginx_dir= "/usr/local/

Examples of interactive and non-interactive user password modifications under Linux _linux shell

Recently managed a number of machines, there is a need to unify the change of an account username password, such as the QA account password changed to 1234, and later for scripting, very convenient implementation, but also used to modify the user's

Shell script implements Linux system file integrity detection _linux Shell

Today found a system to detect the integrity of the shell script, I tried it can be, introduced to everyone.System: CentOS 5.xScript content: Copy Code code as follows: Cat my_filecheck.sh #!/bin/bash # # variable first declared to use

Shell programming to test a single host or network segment host to survive

Title: Write a shell script that uses ping to determine whether the host in the specified IP or IP side is alive. Accept only the specified IP format input and IP segment input (for example: 192.168.2.88 or 192.168.2.) Note that there is a point

Linux will output the content pipeline to your shell's security vulnerabilities

It is a stupid thing to pipe the content of a wget or curl output to bash or sh, such as the following: [Plain] View plain copy on the code to see a piece of coding derived to my Code slice Wget-o-http://example.com/install.sh | sudo sh Command

Shell extension Programming by ATL (i)

For a long time did not give the VC knowledge Base to press, really embarrassed, because the previous period of time is too busy so there has been no time to write something, there are many friends to me to discuss the issue, I am grateful to all of

Execute "spark-shell–master yarn–deploy-mode client", Virtual memory size overflow, error

Execute the following command under Hadoop 2.7.2 cluster:Spark-shell--master Yarn--deploy-mode ClientThe following error has been burst:Org.apache.spark.SparkException:Yarn application has already ended! It might has been killed or unable to launch

Linux to create a new user account at the shell prompt

If you are not logged in as the root user, type the command Su-and then enter the root password to switch to root user mode.1. Create a new User: At the command line, type Useradd, followed by a space and the user name of the new user you created

Shell to prevent brute force cracking

In order to prevent the server from being subjected to SSH brute force hack, will attempt ssh brute force hack this machine more than 10 times of IP to seal off, prohibit its landing this machine!#!/bin/bashCat/var/log/secure |awk '/failed/{print $ (

The Linux shell uses the SED command to add characters at the end of a line or at the beginning of a text

From:http://www.cnblogs.com/aaronwxb/archive/2011/08/19/2145364.htmlWriting a script yesterday took 2/3 of the day, and most of the time spent on the SED command, today do not summarize the time of yesterday, I'm sorry.There are several commands for

SOURCE command not found in SH shell solution

An error occurred while executing the script in Ubuntu system "Source command not found in sh shell"This is actually a script that executes in Ubuntu by default with dash, not bashby command#LS -l 'whichsh/bin/sh --dashWe found that the SH used by

The shell output of the garbage bin--/dev/null

Last night spent a whole night answering a question about the redirect output to/dev/null in the shell. Decisive tonight also synchronous hair here, anyway no one see ~ ~ ~The following comes from a heavy Linux use patient's unsolicited

Linux shell Scripting--Using structured commands (iii)

for commandfor Var in listDoCommandsDoneCode 2-1[Email protected]:/data# cat demo1 #!/bin/bashfor test in Alabama Alaska Arizona Arkansas ' California Colorado ' do Echo "The next state is $test" Doneecho "The last state we visited be $test"

Total Pages: 541 1 .... 87 88 89 90 91 .... 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.