RecommendedArticle:
APIS for file path operations in Shell
Http://www.cnblogs.com/fangkm/archive/2009/04/15/1436674.html
I wanted to sort it out by myself, but I found the above article by Google according to the title of the phenomenon, and I
You can change the shell in three ways:
1. Change the default shell for all later logon sessions
Enter the command CHSH-L to view the available shell and its path of the current system.
After entering CHSH, the system prompts you to enter the
The source command can load another script in one script. The following is an example:
First, we define a function script named myfunc. Sh, as follows:
#! /Bin/bashFunction Square{Local tempLet temp = $1*$1The sum of squares of Echo "$1 is: $ Temp"
I learned the shell script today and copied a simple script on the Internet as follows:
#! /Bin/bashCygwin = true# Assign values to variables:A = "Hello World" # No space exists on both sides of the equal sign# Print the value of variable:If $
Tangent to Vertex
Returns a convex polygon.P, TangentLIsPIntersection andPInternalL.
This concept is similar to orthogonal tangent.
Pair of vertex points
If two verticesPAndQ(BelongP) In the two parallel tangent lines, they form a pair of
The daily log analysis team is really sorry. We often need to provide statistics such as PV, UV, and independent IP addresses. C/C ++ and Java can all be used to write logs. The process is like this, first, read the file, scan it row by row, put the
Http://www.xxlinux.com/linux/article/development/shell/2006-09-22/4499.htmlHttp://www.diybl.com/course/6_system/linux/Linuxjs/20071027/80454.htmlHttp://linux.chinaunix.net/techdoc/system/2008/09/04/1030374.shtmlBoth exec and source are Bash Internal
Linux bash calculator is easy to use, at least it is easier to be lazy.
How:
1. Use the command line# Scale indicates the exact number of digits of a floating point.[Root @ hostname ~] # BCBC 1.06Copyright 1991-1994,199 7, 1998,200 0 Free
This article is great for people who have been using bash in Linux for a long time. The for command has powerful functions!
Self, http://hi.bccn.net/space-21499-do-blog-id-13524.html
For allows some commands that do not support wildcards to operate
Do you still remember the regular expression that used to calculate prime numbers? The world of programming is so interesting that you will always be able to see something special. Have you ever thought that you can put your variables and functions
1. Get user input.The parameter is the regular expression that is correctly checked by the input prompt, and the default value is entered.ReturnThe correct user input is returned.
Function get_input (){Prompt = $1RegEx = $2Default = $3If ["x $
Shell:
Shell Baidu Encyclopedia: Baidu. It receives user commands and calls corresponding applications. It is also a programming language. As a command language, it interactively interprets and executes user-entered commands or automatically
6.3 start the shell Environment
The init_post function comes from the 814 rows of the same file:
811/* This is a non _ init function. force it to be noinline otherwise gcc812 * makes it inline to Init () and it becomes part of init. Text
#! /Bin/bash
A = "one, two, three, four"
# To split $ A, you can:
Old_ifs = "$ ifs"
Ifs = ","
Arr = ($)
Ifs = "$ old_ifs"
For s in $ {arr [@]}
Do
Echo "$ S"
Done
The above code will output
One
Two
Three
Four
Arr = ($ A) is used to
This article is the fifth chapter of Flow Control in learning the bash shell 3rd edition, but we will not limit it to this. Flow Control is a common part of any programming language and includes bash. Here we will learn about them.
If/else is used
Note: No space is allowed between the left and right sides of "=". The semicolon program 1 # is not required at the end of the bash statement #! /Bin/sh # echo somethingecho "Hello World" Echo "Hello !! "CD/root/export topmkdir./ABC Program 2,
There is no doubt about the strength of shell, which makes it easier for us to confuse us. For example, I have always thought that I am smart and cannot tell you clearly.
In Shell, Parentheses, braces, and variables in parentheses are used as
$1 indicates the first parameter. $ * indicates all parameters entered by the user.
The hello1 script is as follows. A location parameter is acceptable.
#! /Bin/bash
Echo $1
Run the Script:./hello1 "Hello World" and output Hello World on the
The Select expression is a bash extension application, especially for interactive use. You can select from a group of different values.Select VaR in...; doBreakDone... Now $ VaR can be used ....The following is an example:#! /Bin/shEcho "What is
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.