Special symbols linux system

symbol effect Examples
# Comment symbol, the content will not be executed after the pound sign echo #WORD
~ The current user's home directory cd ~
; Command execution order, executed successfully or not has no effect on the back of the front Command1; Command2
&& Command execution logic, the success of the previous execution will be performed after the command COMMAND1 && COMMAND2
. Current directory touch ./FILENAME
.. Parent directory cd ..
/ The root system cd /
= Assignment symbol, the value assigned to the latter in front of the variable = with dusays
$ The value of the variable call echo $dusays
All symbols within quotation marks, both lose their special effects echo ‘#WORD’
Symbols within quotation marks, partial loss of special effects echo “#WORD$dusays”
> Redirect, repeat the effect of covering echo WORD > FILENAME
>> Additional redirected, there is an additional effect Repeat echo WORD >> FILENAME
{} Setting a range of range touch FILE{1..10}
* Matches all characters, limited number of rm -f FILE*
? Matches all characters, a number of rm -f FILE?

Extended Content

Linux there are a lot of symbols have special features, in summary here is not, after all, many symbols do not have access.

These symbols are generally used with Shell scripting, a reasonable mix of these symbols can be more effective, but if unreasonable, may cause some irreversible impact, so please understand in advance the role of symbol use, a reasonable match!

Guess you like

Origin www.cnblogs.com/chentao144/p/11949497.html