1.4 Special symbols in the shell

Source: Internet
Author: User

#命令输入特殊符号

* is match 0 or more characters

? is to match one character


#是加上这行不生效

\ is a de-righteous character

$ is the prefix of the variable, using the variable

; is used in the middle of two commands.

[] is matching two files

ls [12].txt = = ls 1.txt 2.txt


Exercises:

1. Which of the following special symbols is right?

LS *.txt will list all 1.txt 22.txt 333.txt.

Ls?. TXT will list all 1.txt 2.txt 3.txt

Touch \ #会创建一个文件名为 # files

2. What is the use of semicolons in the shell?

If you want to write multiple commands to a single line, you can add a semicolon between the commands

3. If there is 1.txt 2.txt 3.txt a.txt in the current directory, which files will be listed using the command LS [12].txt?

1.txt

2.txt


Summarize

Main: * is match 0 or more characters,? is a match for one character, [] is a match of two files


1.4 Special symbols in the shell

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.