The content of this section:A sample shell script code to test the concurrency of the database.Example:#!/bin/bash#********************************# #并发后台运行fun # # forWanggy -- on- -# #note: www.jquerycn.cn # #fun_num Fun functions Background Run # #
This article is part (iv) of the Linux Shell Series tutorial, more on the Shell Tutorial: Linux Shell Series Tutorials
Like many programming languages, there are annotation symbols in the shell, and today we introduce the syntax and usage of
Now, based on the development of Linux, Internet products are basically based on Linux,android,mac, Linux everywhere, so, as a time-tested, not familiar with Linux is not good, record some of the common shell commands in the test.1, LS: Print out
Original link: http://desheng666.blog.163.com/blog/static/4908408220121643953425/The expr command is generally used for integer values, but can also be used for strings. The General format is:Expr argument operator argumentExpr is also a manual
[] is actually shorthand for the test command in bash. That is, all [expr] equals test exprFor the test command, use-eq to make a numeric comparison, and when you pass in the string, you get an error.[[expr]] is a real conditional judgment statement
Python is a very easy way to solve repetitive strings, such as a= "James", so to get "Jamesjamesjames" is "a*3".But this "*" string multiplication in the shell is not, for example, "to output 10 a", do not want to use for the loop to do, how to
1. Basic Scripting functions1.1 Definition of functionFunction name { commands}OrName () { commands}1.2 Simple example#!/bin/shfunction FUNC01 {echo "This is the function of FUNC01"}FUNC02 () {echo "This is function of FUNC02"}FUNC01FUNC02
Writing shell code in makefile is a bit weird, unlike shell syntax, and if you don't understand it, it can be confusing to see makefile. Here's a summary of some.1: The code that is the same line after the colon of the target item of the makefile
1.Shell Script IntroductionBasic Introduction:A shell script is an executable plain text file that consists of multiple shell commands.Command execution is from top to bottom, from left to right analysis and executioncommand, multiple whitespace
The main contents of this section:Top command to count CPU utilizationOne, problem analysisMySQL is multi-threaded under Linux and can only distribute multiple threads to a single CPU.Therefore, using a small server, or PC server, multiple CPU
1. Command-line arguments1.1 Parameters space-delimited, format: $+position, e.g. $, $, $, where $ $ represents the script name, more than 10 parameters, e.g. the 10th parameter is represented by ${10};1.2 Simple example:1.3 Through the
Monitoring ideas, Architecture introductionRequirements: Use the shell to customize a variety of personalized alarm tools, but the need for unified management, standardized management. idea: Specify a script package that contains the main program,
Batch modify file suffixThe first type:#!/bin/bashfor fn in *.$1domv $fn ${fn%$1}$2doneThe second type:Find. -name "*.txt" | Awk-f ' [./]+ ' {print $} ' | Xargs-i-T mv {}.txt {}.shGREP User TipsThe file is as follows:# cat Test.txt This was a test
Summary of Shell interception string methods in LinuxHow does [Linux] calculate string lengths in shell scripts?There are eight ways to intercept a string, mainly for the following methodsThere are a number of ways to intercept strings in the shell,
1. To Peanut Shell website:Peanut Shell official website: hsk.oray.com Download Peanut Shell Intranet version installation package oraynewphrapi.tgz2. Unzip under any path on the Raspberry PiDecompression: Tar zxvf oranynewphrapi.tgzInstall: Execute
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.