Simple shell Multi-process (running in the background)

These two days, because the work needs to do some of the process of work, look at some of the online examples, mostly through the way of pipeline files to achieve, and then think about it without so much trouble ... The following is a simple

A method in the shell script to convert the input password to * (asterisk) _linux shell

If you need to write a section to interact with the user, and need to input some sensitive information (for example: User password, license, etc.), the direct use of printf+read, the user input information will be displayed on the screen, which is

Example of splitting strings in a shell _linux shell

For example, to split test= "AAA,BBB,CC cc,dd dd", you can Copy Code code as follows: arr=$ (Echo $test |tr "," \ n ") I can do that. Copy Code code as follows: old_ifs= $IFS Ifs= ', ' Arr= $test ifs= $OLD

4 ways to remove empty rows from a file in Linux _linux shell

When dealing with some data files on Linux, it is sometimes necessary to filter out the empty rows, and the various tools available in the system can accomplish this function. The usual introductions are as follows:1. grep Copy Code code as

The shell script that statistics appche site IP traffic under Linux _linux

Often need to statistics Apache site traffic based on the IP address, the most basic script. In descending order based on IP traffic: Copy Code code as follows: #!/bin/bash #Script_name: Access_count

jquery Shell Plug-in jquery.fancybox.js usage Example _jquery

This example describes the Jquery.fancybox.js usage of the jquery Pinball plug-in. Share to everyone for your reference, specific as follows: FancyBox is a jquery plug-in, powerful. Support to enlarge the picture to add shadow effect, for a group

Java invoke the Linux shell script method _java

First, we need to increase the user's ability to execute the script, that is, Copy Code code as follows: String cmdstring = "chmod a+x test.sh"; Process proc = Runtime.getruntime (). exec (cmdstring); Proc.waitfor (); Block until the

Linux Beginner's Shell primer

Objective Using the Shell The basic shell commands and mechanisms are described and explained below. First: Super Tools/terminals,xterms and Shells One, Super tool You've probably heard the argument that the command line (the Mommand lines) is

Writing shell scripts in awk

I. Overview 1. Product Overview: Awk is a programming language used to scan and process text and data under Linux/unix. Data can come from standard input, files, and pipelines. Awk represents the first letter of its author's surname, respectively.

If in the shell script. Then.. Elif.. Then.if statement

First type: #!/bin/bash service vsftpd start &>/dev/null if [$-eq 0] Then echo "FTP is start" Else Service VSFTPD Start Fi The second type: #!/bin/bash read-p "Input your file name" file_name If [D-$file _name]//To determine whether the

Linux Shell Learning: How to make a recording playback function script

Not long ago I saw two interesting commands in the book--script and Srciptreplay, which can record a terminal session in a file, that is, we can create a command-line video tutorial through a terminal session, or we can share session files with

Shell script automatically backs up the database

shell script automatically backs up the database 1. Writing Backup scriptsVI backup.sh#!/bin/bashdate=`date +%Y%m%d_%k%M`  mysqldump-uroot-p12345-h127.0.0.1 db | gzip >/home/ubuntu/root/db_$date.sql.gz2. Modify Script executable

Shell input and output redirection

The data flow redirection is used when adding logs to memcached, so I intend to summarize it. Command Description Command > File Redirects the output to file. Command Redirects the input

Linux Shell Programming Learning notes---Chapter III

3.1 Regular Expression BasicsThe primary function of regular expressions is text query and string manipulation. is actually string filtering.Regular expressions include ordinary characters and metacharacters character, meta-character main, see the

Shell Script Installation Nginx

#!/bin/Bashn_url="http://nginx.org/download/nginx-1.8.0.tar.gz"N_pack=`Echo$N _url|awk-F'/' '{print $}'' N_upack=`Echo$N _url|awk-F'/' '{print $}'|awk-F'.' '{print $ "." $ "." $-$}'' N_dir="/usr/local/nginx"functionNginx () {if[ `WhoAmI` !="Root"];

Linux shell features three and a

The shell can be said to be an interpreter while providing a running environment for the code to run. and provides the programming capabilityThe shell does not have its own library, it just writes the applet commands within the command invocation

Shell--sample--Close Tomcat

#!/bin/Bashprocess_name="Org.apache.catalina.startup.Bootstrap"Shutdown_call=0functionShutdowntomcat () {process_pid=`PS-ef |grep "$process _name"|grep-V"grep"|awk '{print $}'` forIinch$process _pid Do Echo "Info:kill the Tomcat process [$

Shell programming Character intercept commands

1. Field (column) Extraction command: Cut [option] file nameOptions:-F column number (extract the first few columns)-D delimiter (split column by specified delimiter)[email protected] sh]# cat student.txt idnamegendermark1alex male 112boby male

A summary of Shell judgment problems

#!/bin/bash#比如需要判断一个变量是否含有值:if [[ -z $1 ]] ; thenecho "Something like empty!"exit 0;fi#判断上一条语句是否执行成功if [[ "$?" -eq 0 ]] ; thenecho "$1 更新成功."exit 0;fi#下面再举一个实例NovaPath=”/home/malu/”NovaFile=”/home/malu/access.log”#这里的-x parameter determines whether $

Use Linux shell to delete folders on window recursively

ObjectiveIn the Windows environment, organize the code, the code contains the. svn folder, which exists in all controlled directories and needs to be removed uniformly.But not familiar with Windows shell, want to use Linux rm to delete, how to

Total Pages: 541 1 .... 524 525 526 527 528 .... 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.