Shell Special Symbols

Source: Internet
Author: User
Tags parent directory

Symbol

Meaning

;

Command delimiter

#

configuration file comments; Root user command terminal prompt

~

Home Directory CD ~

-

Previous Path CD-

Su-linux Switching user Environments

^

Non-[^ABCD]

$

Variable before adding $ out of variable contents

‘‘

Output AS-is

""

$  ``  ! These symbols can be parsed and other characters are output as-is

!

No, take the reverse [!ABCD]

Command executes a command that was executed before

!+ commands for numbers in the history

``

Used to reference a command equivalent to $ ()

{}

Content sequence

{A,c,h} represents a C h

{A.. Z} indicates a to Z

Command block combination (module)

In Linux regular, the number of repetitions {3,5} represents 3 to 5 times

echo {1..10..2}

1 3 5) 7 9

echo {A.. Z.. 2}

A c e g i k m o q s u w y

()

Character sequence grouping

||

Or the previous command failed to execute the following command

|

Pipe;

&&

The following command is executed only if the previous command is executed successfully

&

Command background Run

.

The current directory, the beginning of a hidden file name in Linux, any character in a regular expression; loading a file content

..

Parent directory; {A.. Z

/

Root or Path delimiter

\

Placed in front of the command keyword in Linux to block system aliases; escape

*

Represents any number of arbitrary characters; in Linux regular, repeat the previous character any time

?

Represents any one character; in Linux regular, repeat the previous character 0 or 1 times

+

Repeat the previous character 1 or more times

[]

Also means "there must be a character in parentheses" (not any character). For example [ABCD] represents "must have a character, may be a, B, C, d these four any one"

[-]

If a minus sign is inside the brackets, it represents "all characters in the code order." For example [0-9] represents all numbers between 0 and 9, because the language encoding of the numbers is continuous!

[^]

If the first character in the brackets is an exponential sign (^), that means "invert selection", for example [^ABC] means that there must be a character, as long as the non-A, non-B, not the other characters of C will accept the meaning.

Shell Special Symbols

Related Article

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.