in the middle of a command using the command semicolon (;) to separate, semicolons before executing the command is completed (successfully or not) will be immediately followed by the implementation of subsequent commands)
user@user-virtual-machine:~$ hey=homeeach'$hey'
user@user-virtual-machine:~$ echo $hey
homeeach$hey
user@user-virtual-machine:~$ hey="long"
user@user-virtual-machine:~$ echo da $hey
da long
* The asterisk (wild card)
is quite commonly used symbols.
1, on the filename extension (Filename expansion), she used to represent any number of characters 0 to infinity.
- [root@RHEL6 ~]# ls a*
- aaa anaconda-ks.cfg
- [root@RHEL6 ~]#
2, the regular expression (Regular Expressions), a * represents a repeated character before a plurality of zero to infinity, such as: grep -n 'ess * file.txt, might match es, ess, esss like. Regular expressions are 0 to an infinite number of characters used is. "*" Indicates.
3, in operation, it represents the "multiplication."
let "fmult = 2 * 3"
In addition to the built-in commands let, as well as instructions on a calculation of expr, the asterisk here also assume the role of "multiplication" of. But be careful in the use, he must be preceded by escape characters.
** power calculation
two asterisks stands for "power" means at the time of operation.
let "sus = 2 ** 3" echo "sus = $ sus" # sus = 8
$ And $$ money numbers (dollar sign)
1, using a variable preamble, i.e., before the need to add the value of the variable variable substitution
variable substitution (Variable Substitution) representative symbol.
[root@RHEL6 ~]# vrs=123
[root@RHEL6 ~]# echo "vrs = $vrs"
vrs = 123
2, in the Regular Expressions are defined as "line" extreme end (end-of-line). This is often used in grep, sed, awk and vim (vi) of them.
[root@RHEL6 ~]# ll | grep "txt$" //列出行末是txt结尾的行
-rw-r--r--. 1 root root 1700 May 21 10:50 1.txt
-rw-r--r--. 1 root root 650 May 31 18:11 123.txt
-rw-r--r--. 1 root root 1700 May 21 10:50 2.txt
-rw-r--r--. 1 root root 923 May 27 09:20 network.txt
-rw-r--r--. 1 root root 96 Jun 1 17:58 printf.txt
-rw-r--r--. 1 root root 673 Jun 1 12:24 regular_express.txt
3, in bash $ itself is also variable. Representatives of the shell is the process code, the so-called PID (Process ID) we want to know the PID of the current shell, it can be
[root@RHEL6 ~]# echo $$
4316