echo var

Learn about echo var, we have the largest and most updated echo var information on alibabacloud.com

shell--Mathematical Calculation

The assignment and operation in the shell is the string processing by default, here are some special methods of mathematical operation in the shell, which can be seen later, hehe1. Examples of error methodsAVar=1+1Echo $varThe result of the output

Shell-related knowledge (1)

The Shell's own abilities.Writing scripts is OK, at least now I'm running a script on the InternetProgram-Log scheduled backup and delete, NFS Shanghai volume file Delete and send mail."Data"Export

Small knowledge points accumulate _linux

1. Create a hierarchy directory: Use the-P option for mkdir, such as Mkdir-p tmp/a/b/c.2. Unpack to the specified directory: Use the-c option of tar, such as tar xvf newarc.tar.gz-c tmp/a/b/c.3. Joint command: Use;, &&, | | such as control operators,

Linux Basics (6)

Linux Basics (vi)Three loops and function knowledge points in shell scriptsFirst, the process control if structure1. Simple If instance:#!/bin/bashVar='/ETC/INIT.D'#var= '/DEV/SDA 'if[ -d $var] then echo"$var is directory"elif[ -b $var] then

Shell Script Learning 9 Shell replacement: Shell variable substitution, command substitution, escape character

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-

Linux Shell string interception and splicing

A string interception of Linux is useful. There are eight ways.Suppose there is a variable var=http://www.linuxidc.com/123.htm 1 # Intercept, delete the left character, and leave the right character.  Echo ${var#*//}where Var is the variable name

Linux command line and shell script Cheng Richard blum_linux Shell

First script file Copy Code code as follows: #!/bin/bash echo "This are my I-A-bash code!" Exit 0 redirect Symbols and mathematical calculations Copy Code code as follows: #!/bin/bash Echo-n "The time and

PHP Tutorial: PHP built-in function intval ()

First, describe The Intval function has an attribute: "Until a number or symbol is encountered to do the conversion, and then to the end of a non-numeric or string end conversion", in some applications due to the characteristics of the Intval

Debugging and computing in the shell

2. Correct method1) Use LetVar=1Let "Var+=1"Echo $varThe output is 2, no tragedy this time.Attention:A) I tested let almost support all operators, see an article on the internet said "let does not support + + 、--and comma, (,)", but after I test the

Linux Learning Notes

1, the permissions of the directory: R indicates that the directory can be displayed. W indicates whether the file under the directory can be created, deleted, renamed and other operations. x indicates whether the directory can be entered and the

Variables in Linux

echo $PATHvar =aecho $varexport var1=11echo $var access relationship: Whereis yum File/usr/bin/yumvi/usr/bin/python script: Create a sh.sh #!/bin /bash The following statement uses what to parse echo $varvar 1=12echo $var 1sleep 10echo "Hello" echo $

Shell Foundation--Numerical calculation of variables

Numerical Calculation of variables1.$ ((expression))(1). Experiment 1[Email protected] ~_~ day4]# cat test.sh#!/bin/bashA=6b=2echo "a-b=$ (($a-$b))"echo "a+b=$ (($a + $b))"echo "a*b=$ (($a * $b))"echo "a/b=$ (($a/$b))"echo "a%b=$ (($a% $b))"echo "a**

Shell experience A

What is a shell, what can you do?1. ProceduresNarrow: Operating system programs and applications.The operating system program is used to invoke the monitoring kernel, which runs all the programs we can apply on this operating system.The operation of

How the shell intercepts strings

Reference documents: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

Shell determines whether a file or folder exists

#!/bin/sh mypath= "/var/log/httpd/" myfile= "/var/log/httpd/access.log" #这里的-x parameter Judging $ Whether the MyPath exists and has enforceable permissions if [!-X ' $myPath]; then mkdir "$myPath" fi #这里的-D parameter to determine if

Shell string interception

There are a number of ways to intercept strings in the shell, ${expression} There are 9 ways to use them. ${parameter:-word}${parameter:=word}${parameter:?word}${parameter:+word} The above 4 alternatives can be used for default values. ${#parameter}

Linux Shell Script Raiders (1.3)

1.3 Playing variables and environment variablesvariables are an essential part of any programming language and are used to store variables of various types. Scripting languages are mostly weak type languages (dynamic languages), meaning that when

Shell Programming Considerations in Makefile

Reference: http://blog.csdn.net/wanglang3081/article/details/49423105 (1) Makefile is essentially a shell script, that is, each command is a shell process, and the shell process exits when it finishes running. (2) Shell code line, if there is =,

Shell Programming Technology-fundamentals

I. Script structureThe script for the shell under Linux is to write a series of command sequences in a text file, and this text file can be executed. Development efficiency increases relative to the command line. So his architecture has 2 parts that

Shell Learning--variables

1. In bash, the value of each variable is string 2, view the environment variable of a process cat/proc/$PID/environ | TR ' \ s ' \ n ' 3, variable assignment 3.1, var=value, note that var = value is not an assignment operation, but an equality

Total Pages: 15 1 .... 11 12 13 14 15 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.