1
00:00:01,270 --> 00:00:07,000
To show wild cards in action I will firstly use them for some Linux commands.

2
00:00:07,470 --> 00:00:15,450
But firstly we need to create some files for practicing so we will create certain text and so the image

3
00:00:15,450 --> 00:00:16,110
files

4
00:00:18,910 --> 00:00:25,220
for creating City files I will use for loop as if we didn't cover this topic yet.

5
00:00:25,300 --> 00:00:30,950
Just type in the same as me and we'll explain it more deeply in a separate section.

6
00:00:31,270 --> 00:00:35,590
But basically I am here sometimes Times looping.

7
00:00:35,830 --> 00:00:46,260
And inside each flow I am creating a file ending with a number of between one to serve the and same

8
00:00:46,320 --> 00:00:48,220
also for image

9
00:00:55,140 --> 00:00:56,690
using a command.

10
00:00:56,700 --> 00:01:02,110
We can see that we have created some text and cirrhotic image files.

11
00:01:03,440 --> 00:01:06,080
So now let's make some wildcards

12
00:01:09,940 --> 00:01:19,690
let's say that we want to list files ending with 8:59 don't text.

13
00:01:19,690 --> 00:01:30,600
So file one file two files three up to file nine dot for these values range inside square brackets.

14
00:01:30,690 --> 00:01:40,050
So type out as file square brick get 1 Dash 9 end of square bracket dot text

15
00:01:43,110 --> 00:01:51,700
and we can see that it lists file one file to up to file nine dot text.

16
00:01:51,710 --> 00:02:07,980
Now let's make it more difficult and the list files ending with 8:59 for both text and image extension.

17
00:02:08,130 --> 00:02:21,120
We are starting with the same class file square Brigade one dish 9 and it's end of square.

18
00:02:22,160 --> 00:02:24,830
Don't.

19
00:02:25,280 --> 00:02:32,950
But now we need to say Do this for text and image extension and we are doing it using curly brackets

20
00:02:33,340 --> 00:02:43,330
comma separated Dharam we can see that it lists file one file to up to 5 9 for boat extensions.

21
00:02:43,420 --> 00:02:46,610
Great.

22
00:02:46,790 --> 00:02:50,180
Let's move on something more difficult.

23
00:02:50,390 --> 00:03:01,490
Lists files ending with five to 15 dot text.

24
00:03:01,780 --> 00:03:06,410
You can stop the video and try it on your own if you want.

25
00:03:06,770 --> 00:03:13,150
You know how we will display file 5 up to file 9 using square brackets.

26
00:03:17,420 --> 00:03:24,920
But that's not the solution because we want to display also file followed by number one and then followed

27
00:03:24,920 --> 00:03:28,530
by 0 up to 5 solution.

28
00:03:28,530 --> 00:03:29,640
Here is to.

29
00:03:29,770 --> 00:03:36,810
Kurt lubricates inside them for the first part we specify in square brackets.

30
00:03:36,930 --> 00:03:47,820

31
8:55 disability files ending with 5 to 9 dot text as a second part inside curly brackets will specify

32
00:03:47,820 --> 00:03:53,900
wildcards for listing file 10 to 5 15.

33
00:03:54,060 --> 00:03:58,980
So we need to write one and it doesn't need to be inside square brackets.

34
00:03:59,040 --> 00:04:04,860
If there is only one number inside square brackets it means the same as that number without brackets.

35
00:04:04,890 --> 00:04:14,440
Because square brackets means range and we shorten the range to only one number an inside and hador

36
00:04:14,530 --> 00:04:29,040
square brackets we will specify a range 0 to 5 so it will match 10 11 12 13 14 15 and as it works perfectly

37
00:04:29,070 --> 00:04:32,850
you can see four or five up to five 15.

38
00:04:32,890 --> 00:04:34,910
Great.

39
00:04:35,350 --> 00:04:43,660
Now we can try one of the most common wildcards music we've list all image files

40
00:04:47,770 --> 00:04:49,180
to do that.

41
00:04:49,240 --> 00:04:58,330
We type out as asterisk which represents any number of connectors.

42
00:04:58,630 --> 00:05:04,030
Then we specify don't dot MGE a specific extension.

43
00:05:05,010 --> 00:05:05,710
Great.

44
00:05:05,770 --> 00:05:10,730
We list all image files.

45
00:05:10,790 --> 00:05:14,060
Now I will create a screen

46
00:05:18,470 --> 00:05:22,250
and then we can use wildcards for removing files

47
00:05:25,190 --> 00:05:32,060
so remove files ending with 16 up to 21 that I MGE

48
00:05:35,330 --> 00:05:42,730
to do that will again use curly brackets on the first part of them.

49
00:05:42,950 --> 00:05:47,630
We will specify a range 16 up to 19

50
00:05:51,410 --> 00:05:58,260
and on the second part specify a range.

51
00:05:58,320 --> 00:06:13,800
Then they do find the one.

52
00:06:13,920 --> 00:06:20,740
Now we can check if that follows variability and

53
00:06:27,730 --> 00:06:30,150
and yes they were removed.

54
00:06:30,190 --> 00:06:33,460
You see how wildcards are really powerful

55
00:06:36,470 --> 00:06:41,090
but let's make now last example using wildcards

56
00:06:44,200 --> 00:06:55,380
to list all files which has three characters long extension starting with the letter T.

57
00:07:08,930 --> 00:07:23,130
To do that type out as asterisk dot the question mark question mark as question mark three persons one

58
00:07:23,280 --> 00:07:29,390
character and NEA's we see all textfile displayed.

59
00:07:31,840 --> 00:07:39,670
We can now clear the screen and write some script to see usage of wild wildcards in string comparison.
