1. Trang chủ
  2. » Giáo Dục - Đào Tạo

039 wildcards kho tài liệu training

11 63 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 11
Dung lượng 158,77 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

What You Will Learn● What wildcards are.. ● The different types of wildcards.. ● How to use wildcards with various commands... ● Globbing expands the wildcard pattern into a list of file

Trang 1

Part I

Trang 2

What You Will Learn

● What wildcards are

● When and where they can be used

● The different types of wildcards

● How to use wildcards with various commands

Trang 3

● A character or string used for pattern

matching

● Globbing expands the wildcard pattern into a list of files and/or directories (paths)

● Wildcards can be used with most commands

○ ls

○ rm

○ cp

Trang 4

● * - matches zero or more characters

○ *.txt

○ a*

○ a*.txt

● ? - matches exactly one character

○ ?.txt

○ a?

○ a?.txt

Trang 5

More Wildcards - Character Classes

● [] - A character class

○ Matches any of the characters included between the brackets Matches exactly one character.

○ [aeiou]

○ ca[nt]*

■ can

■ cat

■ candy

■ catch

Trang 6

More Wildcards - Character Classes

● [!] - Matches any of the characters NOT included between the brackets Matches exactly one character

○ [!aeiou]*

■ baseball

■ cricket

Trang 7

More Wildcards - Ranges

● Use two characters separated by a hyphen to create a range in a character class

● [a-g]*

○ Matches all files that start with a, b, c, d, e, f, or g.

● [3-6]*

○ Matches all files that start with 3, 4, 5 or 6.

Trang 8

Named Character Classes

● [[:alpha:]]

● [[:alnum:]]

● [[:digit:]]

● [[:lower:]]

● [[:space:]]

● [[:upper:]]

Trang 9

Matching Wildcard patterns

● \ - escape character Use if you want to match

a wildcard character

○ Match all files that end with a question mark:

■ *\?

● done?

Trang 10

DEMO

Trang 11

● *

● ?

● []

● [0-3]

● [[:digit:]]

Ngày đăng: 17/11/2019, 08:18

TỪ KHÓA LIÊN QUAN

w