Shell programming implements kill thread __ programming

[Root@centos65 liumengyang]# cat test.sh #!/bin/sh #if The process Exists,kill it pid=$ (Ps-ef|grep java| awk ' {print $} ') pidname=$ (ps-ef|grep java|grep-v ' grep ' |awk ' {print} ') #judge If the process is Running.if Not,restart. If

Use of join in Shell programming _ programming

http://www.51testing.com/?uid-45739-action-viewspace-itemid-185211 JoinSimilar to the Join method in db, there is also a left join right join INNER JOIN, etc.Specifies the way the join is specified by the parameter-A.-A1 represents a row that

The use of regular expressions in the Shell __ regular expressions

Here are two ways to use the shell's regular expressions. use method One: #赋值给变量var read var #定义regex正则表达式 regex= "[0-9]" if [$var =~ $regex]];then #match #do Something fi For example, to match the input, the requirement must be a number

Introduction to Shell in Linux __linux

1, shell overview Each person after successfully logged on to Linux, the system will appear a different hint symbol. For example, $, ~, #等, and then you can start typing the command you want, and if the command is correct, the system will execute

Bashdb Debug Shell Script

Recently started to learn bash shell, I do not know where to start, do not know what a good tool package to learn it. First Look for: yao@wuyao:~$ Apt-cache Search BashApparix-console-based Bookmark Tool for fast file system navigationBackup-manager-

A method for Shell to solve syntax error problem

If there is a possibility of a "^m" symbol in the end of a shell script that uses Windows editing Because MS-DOS and windows are carriage return + line wrapping, so in Linux with Vim to see the code written in Windows VC, after the end of the "^m"

disconf Java Boot shell

1. startup file: service-restart.sh #!/bin/sh # java ENV source/etc/profile export java_home=/usr/local/jdk1.7.0_75 export jre_home= $JAVA _home/jre if [$# != 3]; Then echo "USAGE: $ service_dir service_name_pre disconf_env" echo "e.g.:

Linux Shell Script Learning Introduction notes 3__linux

Today continue the last Find command content, mainly find and-exec and xargs combination and use. (9) The Find command can be combined with other commands with the help of an option-exec. -exec is one of the most powerful features of find. For

Java invokes the shell command under Linux and returns the result as a stream __web

This article writes that Java invokes the Linux shell command and returns the result as a stream. The following is directly on the code, the code is annotated. Very plain and easy to understand. Import Java.io.BufferedReader; Import java.io.

Linux shell Programming Notes-shell input and output -2-read-cat-pipe _ block chain

1. Read command The read command reads information through a keyboard or a line of text in a file and assigns a value to a variable. 1.1, read reading the keyboard data, the input of the content before the return of the data assigned to a variable:

shell+ Timing Task +nginx signal Management implementation log cut storage by date

We renamed yesterday's log 00:00:01 every day, placed it in a specific directory, and then USR1 the information number control Nginx to regenerate a new log file Create a new shell script under directory/usr/local/nginx/logs/runlog.shNote: The file

Description: Shell explanation command, calling program

First, Introduction 1. Cal Calendar LS Viewing files and directories WHOAMI Viewing Current user information Users or who or W view the current online user Logout Sign Out Shutdown or Powoff shut down the system Init 6 or Reroot reboot system passwd

Shell parameter Extensions

Recently looking at the script inside the OpenWrt, with too handsome, the following 2 parameters extended expression of large use, all recorded. ${parameter:+expression} If parameter has a value and is not empty, use the value of

Simple backup logs and auto-restart Tomcat shell scripts

#!/bin/sh #backup tomcat1 log lastdate= ' date-d "-7 Day" +%y-%m-%d "logfile=/tomcatlog/localhost_access_log.$ Lastdate.txt if [-F "$logfile"]; Then echo ' exist file ' mv $logfile/tomcatlog/localhost_access_log. $lastdate. Txt.bak Tar

Passing the shell path variable into sed

Everyone must know how to get the sed into the shell variable However, there is a problem with passing in the path variable. #!/bin/bash export vob=/home/fesu/server sed-n '/^vob/{s/\ (vob=\). */\1 ' "$VOB" '/P} ' $VOB/scripts/build/ Makefile

Bash Shell determines if there is a given element in the array

#判断数组中是否有给定元素 #参数: 1 arrays; 2 element #返回: Yes/no # Example: # Determine if there are elements in array Xrsh_array i3 # xrsh_array= (i1,i2,i3) # xrsh_tmp= ' echo ${xrsh_array[*]} ' # Xrsh_arrhasitem ' $XR Sh_tmp "" i3 "# returns YES # Note: The

Shell Common function functions

Checkpid: Check if PID already exists, if one exists, return 0 (by viewing the/proc directory)Daemon: Start ServiceKillproc: Kill a processPidfileofproc: Finding the PID of a processPidofproc: Ditto, use the PIDOF commandStatus: Returns the state of

Shell Script Learn

The previous writing test program used scripts to raise interest, combined with specific cases, to test the results of learning. Finally understand a slightly more complex shell script. There are still a lot of technical things in there. Declared

Linux enters the history command in the shell

In the Linux shell, often input commands have a lot of similarities, even the same, if the long command, the efficiency is really very low, but can be through ctl+r, find the history of the previous input commands, it is very useful.After pressing

Shell Common Commands

PM2:Start ----- pm2 Start/bin/www-watch stop ----- pm2 Stop app_name| app_id Display LogView port occupancy and force the release of occupied portsSometimes when the software is turned off, the background process dies, causing the port to be

Total Pages: 541 1 .... 456 457 458 459 460 .... 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.