Basic Bash Shell command--1

1.manAccess the manual pages stored on your Linux system. You can use the Man command to view a command.Eg:man ls man Mans2.cdSwitch directories. The path to the directory has an absolute path and a relative path.EG:CD. Switch to upper-level

Memory monitoring and alarm shell scripts

# free-m |awk ' nr==3 {print $NF} '4012#!/bin/bash Scriptused_mem= ' free-m |awk ' nr==3 {print$nf} 'If [$used _mem-lt 5000]Thenecho "Mem is not enough, $used _mem."echo "Mem is not enough, $used _mem." | Mail-s "MEM Warning $ (data +%f)" [email

Shell script finds Tomcat's PID and path by path

#!/bin/bashif [!-n "$"];thenEcho-e "Usage: $ PATH"Exit 30Fi#T_P =$ (PS aux |grep "$" | grep-v-E "Grep|tomcat_path" |awk ' {print $, $ (NF-3)} ' |sed ' s/-dcatalina.home=/--/g ‘)echo "-pid-------------------PATH----"PS aux |grep "$" | Grep-v-E

(13) Use of JMeter Bean Shell (ii)

This article from: http://www.cnblogs.com/puresoul/p/5092628.htmlPrevious jmeter Bean Shell Use (a) a brief introduction of the bean shell in the next jmeter, this article is a supplement to the above, the main summary of the several commonly used

Shell file processing Tools

vim/etc/resolve.conf View DNS6.shell script Commands1.diffDiff file File compares the differences of two files-C Displays the surrounding rows-U generates patches in a uniform output format-R comparison of files in two directoriesPattch file

Shell Programming for Linux

Basic knowledge of Shell programmingThree ways to empty a log1.echo Cary >test.log>test.log2.echo Cary >http://www.qixoo.qixoo.com/test.logEcho >test.log3.echo Cary >test.logCat/dev/null >test.logShell scripts are good at working with plain text

Conditional judgment in shell programming (Shell 05)

Conditional judgment in shell programmingConditionsIf-thenCaseIf-thenSingle conditionif commandThenCommandsFiWhen the command return code is 0 o'clock, the condition is setif.sh#! /bin/Bashif Date Then Echo "command EXEC"fiifdate123 Then

Shell command: SEQ

About SEQThe SEQ command is used to generate all integers from one number to anotherseq 1 5 Output 1-512345seq 5-1 1 Reverse Output 1-554321[[email protected] ~]# seq 1 2 //output 1-10 and output once every two digits 13579seq 9-2

Linux Learning Diary-shell scripts and Scheduled Tasks

This article will aim to implement regular automatic backups of the MySQL database, and introduce the perfect collaborative process between shell scripts and scheduled tasks. Where the shell script is responsible for the specific backup operation,

Duplicate files with the same deleted contents as shell scripts

#!/bin/bash#! Delete duplicate files with identical contentsLs-ls--time-style=long-iso | awk ' begin{Getline;getline;Name1=$8;size=$5}{name2=$8;if (size==$5){"Md5sum" name1 | getline;csum1=$1;"Md5sum" name2 | getline;csum2=$2;if (csum1==csum2){Print

Mac Setup shell script boot from

Recently need to do a distributed architecture of the site, is currently in the debugging phase, each time the boot to start a lot of tools, such as Zookeeper, ACTIVEMQ, Redis, Nginx and so on, take pains.Search the Internet on the Mac how to set up

PURE-FTPD Write an auto-install script shell

After running the script, enter Yes to install automatically#!/bin/bashport= ' Netstat -lnp|grep :21|wc -l ' Check_ok () {         if [ $? -eq 0 ];then        echo   "Check ok" elseecho  "check error "  && exit          fi}read -p  "auto install ftp 

Linux shell scripts Delete outdated files

Before writing this shell, let's talk about how the stat command is usedFirst, about time stampEach file has 3 of the time (called timestamp timestamps), for these 3 kinds of time, many times easily confused, so here to explain:  Access Time ( Atime)

When to use the shell

Because the shell appears to be a common feature between UNIX systems and is standardized by POSIX. As a result, shell scripts can be applied to many systems once they are "written attentively". Therefore, the reason to use shell scripts is based on:

Shell Command _awk command

# awk ' Condition 1{action 1} Condition 2{action 2} ... ' File namecondition (Pattern):Generally use relational expressions as conditions x > 10 to determine if a variable x is greater than 10x>=10 greater than or equal to xactions

Linux operating system shell and functions

definition of shell and function1. Linux Shell functionsform a set of command sets or statements into an available block, These statement blocks are called functions. 2. composition of Shell functionsFunctions Name: Function names, note that the

The Four musketeers in shell programming

Vim commandReplace:%s/aaa/bbb/%s/aaa/bbb/gRegular Expressions:^ Opening$ end[0-9] Number[A-z] lowercase[A-z] capitalization[^a-z] Non-lowercase{1,3} 1 to 3 times. Any single character, except \ r \ n* 0 times to several times? 0 times to 1 times+ 1

Shell Programming-cont.

Shell scripts can be seen as a stack of commands, implemented by combining command flow control mechanisms.The interpreter #!/bin/bash or/usr/bin/python is also known as ShebangThe generic script needs to give execution permission, or you can use

Shell Script Raiders (reading notes)--1.10 debug scripts

Using Sh-x or this bash-x, you can debug a script that outputs and outputs a state for each row while debugging, and It also shows the order in which the commands in the script are executed . You can also use set in the script to set the debug area.

Shell Primer to Mastery

Sort Http://www.cnblogs.com/51linux/archive/2012/05/23/2515299.html

Total Pages: 541 1 .... 260 261 262 263 264 .... 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.