Shell Script Process Control

4.1.3 Shell Process Control Statements If condition judgment StatementIf ( expression ) #if (Variable in Array)Statement 1ElseStatement 2FiCase one, test if the directory exists, does not exist then new (note that space must be between the brackets)

Shell Script Process Control

4.1.3 Shell Process Control Statements If condition judgment StatementIf ( expression ) #if (Variable in Array)Statement 1ElseStatement 2FiCase one, test if the directory exists, does not exist then new (note that space must be between the brackets)

Basic Bash Shell command--3

Environment variables in the shell become global variables and local variables. Global variables take all caps.1.printenvView the global variables for the system.Displays the value of a single environment variable using the echo command.Eg:echo

Shell gets the current path

Prg= "$"while do ls= ' ls-ld ' $PRG "' link= ' expr ' $ls": ' .*-> \ (. *\) $ ' ` if expr "$link": '/.* ' >/dev/null; then PRG= "$link" else C15/>PRG= ' dirname ' $PRG '/' $link ' fidoneprgdir= ' dirname ' $PRG '-Z ' $CATALINA _home "] &&

Shell scripts to prevent sshd from being violently cracked

1, Tail-f/var/log/secureYou will find a lot of login errors. This means that your machine is being violently cracked.2. Create a new shell scriptSave exit.3, join the timing CRONTAB-EI'm judging every 10 minutes here, you can put a little longer.4.

Introduction to Linux and common commands getting started with 5--linux shell programming

Shell script to generate test dataVim data_create.shRm-rf./data.txtTouch Data.txtFor ((i=0;iDoStr= ', name ';Name=${i}${str}${i}#echo $nameecho $name >> data.txtDoneecho ' Show TestData 'More Data.txtchmod u+x data_create.shRun the scriptSh-x

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

HDU 5730 Shell Necklace (CDQ Division +fft)

mul

"Topic link" http://acm.hdu.edu.cn/showproblem.php?pid=5730"The main topic"Give An array w, representing the weights of the fields of different lengths, such as W[3]=5, if the field length is 3, then its weight is 5, and now there is a field of

Lao Li share: "Linux shell Script Raiders" Essentials (VI)

1. Print Network interface list[touch_more]# ifconfig | cut-c-10 | Tr-d ' | Tr-s ' \ n 'Eth0Lowww.qixoo.qixoo.com//cut-c-10; The first 10 characters of the output;Tr-d "; Delete all spaces;Tr-s ' \ n '; Compress repeated line breaks2. View Name

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's 99 multiplication table

echo-n non-newline output$echo-N "123" $echo "456" final output 123456 instead of 123456 echo-e handling special characters if the following character appears in the string, it is handled in particular, not as a general text output: \a a warning; \b

Shell launches Hadoop cluster

Original, reproduced please specify. Thank youShell launches Hadoop cluster1: Clear Boot order1) Start zookeeper cluster (in CentOS 4-02,centos6-02,centos7-02 respectively)app/zookeeper-3.4.5/bin/zkserver.sh Start//startup processapp/zookeeper-3.4.5/

Let and expr shell operations compare let's win

Integer operations in shell scripts are generally implemented by the two instructions of let and expr, such as the variable s plus 1 can be written: let "s = $s + 1" or s= ' expr $s + 1 'The two are not easy to write, but the performance of the

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,

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

Special usage of $0,$?,$! in shell

Variable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the

I have encountered a summary of the shell trivia points

1) Use of shell ifDetermine if a.txt existsIf [-F a.txt]2) Execution result of the commandAssign the execution result of the command to the variable, the following two methods are the sametime=$ (date +%y%m) time= ' date + $Y%m '3) Find out what we

Shell Note 9

File type: Normal file, directory file, socket file, device file, link file determines whether a file is a symbolic link file. Yes, move it to the/etc directory; No, do not handle it . 1 #!   /bin/bash 2 #filename: a.sh 3 filename= 4 echo "Input

Using Jenkins to remotely execute Linux shell commands on Windows

The company recently built Jenkins on Windows, but the release was published to a Linux server, so there will be a problem with executing the shell command on the automatic deployment, and then looked for it;Discover that Jenkins has a plugin for

Create a DS13 server using Windows Power Shell

Create a DS13 server using Windows Power ShellThe Web page is created first:Virtual Cloud Service (ServiceName): Zampdmp-dsVirtual Network (vnetname): az-dmpnetworkTo create a new DS13, the attachment 800G Disk PowerShell command is as

Total Pages: 541 1 .... 356 357 358 359 360 .... 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.