When we are learning some frameworks, we usually invoke a script when we start the framework, and pass some parameters to the script, and the script will do different things depending on the parameters we pass, and the parameters we pass are the
Recently the company is not very busy, so the idle time to read more about the shell of some things, because in the development test under Linux, know something about the shell is very helpful to yourself.about what a shell is, a shell of Linux that
Select is also a kind of loop, it is more suitable for use in the case of user choice.For example, we have one such requirement, after running the script, let the user go to select the number, select 1, run the W command, select the 2 run Top
Characters that use double quotesDouble quotes are an important part of the shellecho Hello echo"Hello World" Hello WorldHow to display: Hello "World"is the following command OK? $ echo "Hello" World ""Correct method: echo "Hello \"
:() {:|:&};:Just 13 characters is a bomb, used to look like a simple rote, now also know the point of the fur principle.:() in bash allow: as a function name{} function body:|:&: The function is called first, and then the pipeline calls another new
Sed is a good file processing tool, itself is a pipe command, mainly in the behavior of the unit processing, you can replace the data rows, delete, add, select and other specific work, the following first understand the use of SEDThe SED command
This script is mainly used to modify the IP address to static!#!/bin/bash# #Target: auto chmod ip information! #Date: 2015-05-10#author: jacken# Qq:654001593#qq group:170544180#version: 1.0#only allow define variableshopt -s
1. How can I redirect the standard output and error output to the same location at the same time?There are two ways to achieve this:Method One: 2>&1# Ls/usr/share/doc > Out.file 2>&1The implication is that if a file exists, the result is output to
Pattern of 1.AWKBEGINENDexpression Example: nf>10 or/^a//regular expression/?You can use a/^a/like this.Another way of writing $ ~/^a///Field matchBetween expressions you can use && | | !?: Operators do Boolean operations (which can be regular
NOTES: # Note: The # in #!/bin/bash at the beginning of the shell file is not a comment run: 1, bash shell.sh 2, chmod +x shell.sh./shell.sh 3, add to Path change Amount of 4,. ./shell.sh Troubleshooting: 1, syntax error when running with prompt 2,
Tag:shell integer arithmetic operator The arithmetic operator shell only supports integer operations, and most common arithmetic operations are used in conjunction with the Shell's built-in command let. +-*/% * * (Power operation) + = = *
To change file names in bulk:1. Add. bak or other regular characters after multiple filesLS |xargs-n1-i{} mv {} {}.bakOrFind./*.txt-exec mv {} {}_bak \;2. General-Purpose Batch change scripts#!/bin/bashread -p "old extension:" oldextread -p "new
The shell is also called the command line interface, which is the interface between the user and the computer under the *nix operating system. The word shell refers to the program in the operating system that provides access to the kernel
Bash is a Linux-based shell, and many of the commands described in the front are handled by Bash's environment. Here's a general-to-local understanding of bash. For bash I've roughly divided it into three parts: variables, the configuration of the
I. Condition judgment of shell programming1. Integer testA. Expressions for conditional tests[Expression][[Expression]]Test expressionB. Integer comparison-EQ: Tests whether two integers are equal, such as $A-eq $B-ne: Test whether the two integers
The feature of this series of blogs is--give the results of each orderOriginally wanted to write a good process, get a picture of what, but think online analysis too much, are better, so these blog even if it is a summary of their own it.#include
1. the process of inserting a sort is like the way we usually play poker to get the cards inserted, constantly inserting the cards that have been taken out into place.The initial ordered interval size of the insertion sort process is 1, the first
Special characters of shell scripts1. # comment ,#! Besides, echo $ {PATH # *:} parameter replacement does not represent annotation, numeric conversion, and echo $(2 #101011) 2 .; command Line separator. Multiple commands can be written in one line.
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