If the expression contains special characters, the Shell will replace it. For example, using a variable in double quotes is a substitution, and an escape character is also a substitution.As an example:
#!/bin/bash
A=ten
echo-
One, string interception":" represents interception1.1 ${var: Start position: Length}Starting position starting at 0 (0 can be omitted)x=13918581996Echo ${x::5} #只取前5位数字139181.2 Expr substr "$var" Start position lengthStarting position starting from
Set,e translation is the meaning of "setting", which is equivalent to the "order" in mathematics.such as: Set X=5, is to make x=5 meaning.Grammatical form:SET [variable=[string]]set/p Variable=[promptstring]set/a expression
One, SET
Turn from: http://www.cnblogs.com/kuyuecs/archive/2012/07/18/2597068.html
1 JS way to call PHP file and get the value in PHP
Give a simple example to illustrate:
As in the page a.html, use the following sentence:
There is a section of PHP
Header ("Content-type:text/html;charset=utf-8");$link =mysqli_connect (' localhost ', ' ye ', '); localhost can use 127.0.0.1 instead of MySQL link named ye password nullmysqli_select_db ($link, ' test '); Select the database is the link name the
There are some limitations to mathematical operations in the shell. It is mainly divided into the following types:1. square brackets-------support only integer arithmetic[[email protected] documents]$ var1=$[1+5] [email protected] documents]$ echo
#shell判断文件夹是否存在 # If the folder does not exist, create a folder if [!-D "/myfolder"]; Then Mkdir/myfolderfi#shell determine the file, whether the directory exists or has permissions folder= "/var/www/" file= "/var/www/log" #-x parameter to
POSIX shell tips
This article is used to record some of the useful tips I have found. This is a paper about POSIX (and other noncompliant shell script techniques. I have always insisted that the Bourne system is not a good programming language,
2016-08-18Content of the lesson:Shell Programming Basics (select loops and menus, functions)Yum Management, custom Yum WarehouseSelect loops and MenusSelect variable in listDoCircular Body CommandDone1. The Select loop is used primarily to create
This shows the encoding specification from the PHPCMS development documentation. although it is called the PHPCMS development specification, I think this applies to all PHP programming. After writing so many PHP codes, many codes may not be able to
This article presents 10 UNIX command line habits that are worth using & mdash; to help you overcome many common usage quirks and improve the working efficiency of the command line. These 10 good habits are listed below, and a more detailed
PHP kernel exploration variables (2)-Understanding references
Main content of this article:Introduction to the symbolic table and zval reference principle back to the original question I. Introduction
I wrote an article about references a long time
The main content of this article: The introduction symbol table and the zval reference principle returned to the original question 1. A long time ago, I wrote an article about the reference, many principles are not clearly stated. Recently, before
Note: This shows the encoding specification from the PHPCMS development documentation. Although it is called the PHPCMS development specification, I think this is the case for all PHP programming. After writing so many PHP codes, many codes may not
Getting Started with PHPA. VariableVariables are used to store values, we command the server to work, often need to produce some data, need to be stored temporarily for easy access. We can also understand that the variable is like a shopping bag, we
PHP's resolution to the global variable is that global variables are defined globally, but this global variable is not applied to the entire site, but is applied to the current page, including all files of the include or require.
Cases
Use global variables in PHP and $globals[]
In PHP development projects, will inevitably use the global variables, such as some Web site configuration information, the whole station general, it can be set in one place, and then multiple places to
1. Temporary replacement if not set (:-)Colon: Used to verify that the variable has been set, if there is no colon, it is assumed to have been set, not replaced$fruit =peach$echo ${fruit:-plum}Peach$fruit =$echo ${fruit:-plum}Plum$echo $fruit$2, not
Background
For any language, it makes sense to understand its execution model and memory model, and the content in this article is not necessarily correct, please criticize it more.Execution model
Each request is a standalone PHP process, and two
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.