Fourth Chapter Shell Process Control

Process Control is the instruction that alters the order of the program's operation.4.1 If statement4.1.1 Single Branchan If condition expression; Then command fiExample:#!/bin/bashn=10if [$N-gt 5]; then echo yesfi# bash Test.shyes4.1.2 Dual

Shell condition Test Statement three methods

1, test-f file 2, [-F file] 3, [[-F file]][-F file1-a-F file2] logic with [-f file1-o-F file2] logic or [-f file1] && [-f file2] the same as a string operation best double quotes such as-n-z = = = And a space is added to both sides of the equals

Shell script randomly draws students in class

#!/bin/ bash#JW = (' Wang Hao ' ' Shei Yunsheng ' ke Yang ' He Shingyu ' Repeti soldier ' Dengbellin ' Liu Dao ' ' Yang Jidong ', ' Chu Ziwen ', ' "' Yang Dong '" Huang Tinghui ' ' "," "The" "The" "The" "The" "The" "The" "The" "the" ' Zheng

Hbase Shell Operations Summary

Enter HBase command line./hbase ShellShow tables in HBaseListCreate a user table with info, data two column familiesCreate ' users ', ' info ', ' data 'You can also use the This command:Create ' users ', {NAME = ' info ', VERSIONS = ' 3 '}Insert

A simple shell tutorial

Shell TutorialsThe shell is a program written in C that is a bridge for users to use Linux. The shell is both a command language and a programming language.A Shell is an application that provides an interface through which users access the service

Shell script Remote Batch execution command

#! /usr/bin/expectip_array = $ (cat /tmp/ip.txt) username = rootfor ip  in ${ip_array[*]} {                 ##### #IPspawn  ssh -p 6122 [email protected]$ $ipexpect  {"(yes/ NO)? "  { send  "yes\r";  exp_continue } "Password:"  { send  "[email 

CentOS boot automatically executes shell script to start Tomcat server

Sometimes it is necessary to start the project automatically after the start of the CentOS system, when the project is deployed in Tomcat, if the CentOS shutdown after the boot, the project has been stopped, and then need to be a manual to open each

Shell scripting Exercises (12.12)

Write a script, create a folder, enter a folder, and then use the loop to create a sequential file in the folderIdea: 1. Create the specified folder and go to the folder2. Specify a variable with a value of 0 to allow this variable to be recycled3.

Shell Script Practice Purge Log

In the production environment log is the operation and maintenance personnel to understand and analyze the production environment first-hand information, but the content of the log information is quite large, especially in the public cloud

Getting started with Linux shell scripts--cut command

Getting started with Linux shell scripts--cut commandCutThe Cut command extracts text columns from a text file or text stream.Cut grammar[[email protected] ~]# Cut- D " Delimited character " -F fields for having a specific delimiter character [[

Login shell and non-logon shell

Log-in Shell:Su–usernameSu-l usernameNon-logon Shell:SU usernameOpen Command Window under graphics terminalShell scripts that are executed automaticallyBash's configuration fileGlobal

Common commands under the shell

1.HELP displays a list of all built-in commands, or the use of a built-in command #help//View all built-in commands #help built-in commands//view built-in command usage #help-S built-in command//display the syntax format of the

Jenkins+git+maven+shell implementation of Project one-click Release

First, prefaceAs is known to all, Jenkins can implement project updates by default (via SVN, but our company uses git), and projects are released through (Maven plugin), but in this case under some containers (such as Tomcat), The JVM will report

Jenkins+git+maven+shell implementation of Project one-click Release

First, prefaceAs is known to all, Jenkins can implement project updates by default (via SVN, but our company uses git), and projects are released through (Maven plugin), but in this case under some containers (such as Tomcat), The JVM will report

Shell Script Example

#!/bin/bash######################################################## Name:shell_exp.sh# version:v21.0# function:backup MySQL Databases Template Script# Author:zz# Create Date:2016-12-03# Description:study###############################################

case where the shell handles the file name itself with an asterisk

You must enclose all the file names you get into the array, or the for loop will be parsed as a wildcard, or you can use a shell dictionary, as well as quotation marks.Shell Dictionary Example#!/bin/BashEcho "Shell Definition

Linux Shell Combat (IPCS tools)

#!/bin/Bashwhoami=' WhoAmI 'if[$#-lt"1"] then echo'[program name] [Action Object]'Exit0fi# requires two parameters, parameter one: start line, parameter two: End line, parameter three: Operation Object function seddata{ forNumxinch' IPCS | Sed-n ${1}

Shell Note: Get the native IP address

#!/bin/bash#2.sh# Write a shell script to get the network address of this machine. #比如: The IP address of this machine is: 192.168.100.2/255.255.255.0, then its network address is 192.168.100.1/255.255.255.0# Note: Bcast with the previous IP address

A simple example of shell-script

#!/bin/Bash#defind the Pathpath=/usr/Localexport Pathread-P"Please input your first name:"Firstnamereap-P"Please input your last name:"LastNameEcho-E"\nyour name is: $firstname $lastname"#useDateCreatefileRead-P"Please input your

Mathematical operations of Shell script arrays

Today in the shell script to write Fibonacci sequence calculation, has been constantly error, the main reason is because the shell script is too intelligent, in the array operation need to write a lot of symbols, it is easy to confuse, so a little

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