1 00:00:00,300 --> 00:00:00,640 All right. 2 00:00:00,720 --> 00:00:03,510 Now it's time to talk about searching and manipulation. 3 00:00:03,870 --> 00:00:10,500 Now first, let's start with the great command, the great command search for The X-Files for the occurrence 4 00:00:10,710 --> 00:00:13,380 of a given regular expression and output. 5 00:00:13,560 --> 00:00:18,300 So it stands for no grip, OK, or no regular expression? 6 00:00:18,720 --> 00:00:19,200 OK. 7 00:00:19,590 --> 00:00:20,010 All right. 8 00:00:20,130 --> 00:00:27,930 Now let's have this command that Dallas and we learned that using the L e four list long list format 9 00:00:27,930 --> 00:00:31,470 and for all the finds, it would show us something like this. 10 00:00:31,590 --> 00:00:37,050 As you can see now, if I want to search for the desktop, for example. 11 00:00:37,530 --> 00:00:45,990 OK, so let's clear the screen, unless that Shelly then using the pipeline as we learned previously, 12 00:00:45,990 --> 00:00:47,490 using their grip command. 13 00:00:47,550 --> 00:00:54,390 So the output of this will be considered input for this so grip then in double quotation, all without 14 00:00:54,390 --> 00:00:55,150 double quotation. 15 00:00:55,170 --> 00:01:01,230 Let's put this stop and remember, this is a case sensitive so as you can see it found. 16 00:01:02,390 --> 00:01:03,080 The desktop. 17 00:01:03,500 --> 00:01:04,099 Here it is. 18 00:01:04,610 --> 00:01:10,310 OK, now if I put this this mall like this, it will not show anything. 19 00:01:11,000 --> 00:01:17,540 But if I put it or use the Dash II flag, which means ignore their case sensitive. 20 00:01:17,810 --> 00:01:20,900 So it will put it, as you can see, is capital. 21 00:01:21,080 --> 00:01:23,750 Yeah, the character or this mall will do their job. 22 00:01:24,170 --> 00:01:26,780 All right now, by the way, men grip. 23 00:01:27,170 --> 00:01:29,120 You can see that it has a lot of options. 24 00:01:29,120 --> 00:01:33,740 Actually, grip is a huge topic here because it has a lot of options, flags, whatever. 25 00:01:34,040 --> 00:01:35,600 OK, cool. 26 00:01:36,230 --> 00:01:37,430 Now let's talk about sin. 27 00:01:38,770 --> 00:01:40,600 It is about polystyrene stream, Ed. 28 00:01:41,670 --> 00:01:47,070 It is also a very complex, so we would only briefly scratch its surface, OK, here. 29 00:01:48,540 --> 00:01:53,550 So, for example, it's clear the screen looks equal here, for example. 30 00:01:54,450 --> 00:01:56,880 Hello, there I am. 31 00:01:58,270 --> 00:01:58,660 Zero. 32 00:01:58,930 --> 00:01:59,260 OK. 33 00:01:59,680 --> 00:02:06,460 So this will, Brent, hello, there I am, zero now in the output booth using the pipeline, then sit 34 00:02:07,000 --> 00:02:09,070 and then put single quotation. 35 00:02:09,370 --> 00:02:16,660 Now here we would put that slash that zero and then slash, but one. 36 00:02:17,980 --> 00:02:19,690 OK, so this means will. 37 00:02:20,770 --> 00:02:23,530 Replace the zero with one. 38 00:02:23,650 --> 00:02:28,690 OK, so Sid used for bliss and text manipulation, so you can see that. 39 00:02:28,930 --> 00:02:29,650 Hello, there I am. 40 00:02:29,650 --> 00:02:30,610 Zero, it was there. 41 00:02:30,760 --> 00:02:31,510 Hello, there I am. 42 00:02:31,810 --> 00:02:32,900 I am zero now. 43 00:02:32,920 --> 00:02:34,150 Hello, there I am one. 44 00:02:34,540 --> 00:02:34,960 OK. 45 00:02:36,050 --> 00:02:43,100 Could now also we can use the cut command, and this is a command is quite handy. 46 00:02:43,580 --> 00:02:45,710 So let's clear the screen again. 47 00:02:45,710 --> 00:02:47,900 Let's use this in the same sentence. 48 00:02:47,930 --> 00:02:48,770 Hello, there I am. 49 00:02:48,770 --> 00:02:49,130 Zero. 50 00:02:50,170 --> 00:02:50,680 OK. 51 00:02:51,040 --> 00:02:55,300 So hello, there I am, zero output this and use the cut command. 52 00:02:55,660 --> 00:02:57,140 OK, now cut. 53 00:02:57,160 --> 00:03:00,900 We will use the dash of option, which is the field. 54 00:03:00,910 --> 00:03:03,750 No, we are cutting as you can see the field. 55 00:03:03,760 --> 00:03:09,280 No, it will be tool, for example, or as you can see, tool. 56 00:03:09,730 --> 00:03:10,480 Now follow me. 57 00:03:10,480 --> 00:03:12,250 For now, I know you got confused. 58 00:03:12,760 --> 00:03:20,680 Dash NI, which is that the limiter or for the field delimiter and the delimiter will be the space. 59 00:03:21,040 --> 00:03:25,810 OK, so this means that cut the second presenter I will show you. 60 00:03:26,140 --> 00:03:29,380 So you can see that it is hello there. 61 00:03:29,950 --> 00:03:32,860 As you can see, I am zero and delimiter. 62 00:03:32,860 --> 00:03:33,790 Here is space. 63 00:03:34,000 --> 00:03:36,700 So which means that this is the first one. 64 00:03:36,700 --> 00:03:41,710 As you can see the delimiter what distinguish between these two is there's space here. 65 00:03:41,860 --> 00:03:42,960 Hello, space. 66 00:03:42,970 --> 00:03:45,790 Their space I space. 67 00:03:45,790 --> 00:03:47,230 I'm space zero. 68 00:03:47,470 --> 00:03:56,710 OK, so the delimiter here to distinguish between their characters or what is space and cut the second 69 00:03:56,710 --> 00:04:01,300 one, which means that this is the first one, the hello and this is the second one. 70 00:04:01,510 --> 00:04:04,770 So if I want to have the zero, what should it? 71 00:04:06,870 --> 00:04:10,200 Yes, you are correct, I should say this from two. 72 00:04:12,170 --> 00:04:14,600 From number two, I mean to right. 73 00:04:15,380 --> 00:04:18,709 And you can see that one two three four five. 74 00:04:19,100 --> 00:04:21,230 So it will cut five here. 75 00:04:23,260 --> 00:04:26,350 By the way, if I have something is, for example. 76 00:04:26,380 --> 00:04:27,460 Hello there. 77 00:04:28,910 --> 00:04:32,390 But to hear or comments like these. 78 00:04:34,470 --> 00:04:40,320 And but this it will not work because you can see there there are no space here. 79 00:04:40,530 --> 00:04:45,540 But but it is listed here like this and press enter. 80 00:04:45,630 --> 00:04:51,720 It will give the same result because this is the first one the second, third, fourth and fifth. 81 00:04:52,650 --> 00:04:52,990 OK. 82 00:04:54,300 --> 00:04:55,140 So far, so good. 83 00:04:55,470 --> 00:05:03,060 Now finally, we will have that A.W. Care Utility and A.K. actually is a programming language designed 84 00:05:03,060 --> 00:05:08,240 for text processing and is typically used as data extraction and reporting tools. 85 00:05:08,730 --> 00:05:09,150 OK. 86 00:05:09,360 --> 00:05:11,370 So for example, let's have this eco. 87 00:05:13,190 --> 00:05:15,140 Who am I, for example? 88 00:05:15,980 --> 00:05:19,000 And then the outward let's use kid. 89 00:05:19,610 --> 00:05:25,610 And then we will use single quotation inside that we open places and then we print. 90 00:05:27,240 --> 00:05:31,800 Shift, though, not sign of shift for which means do not sign one. 91 00:05:32,580 --> 00:05:34,560 And but this day. 92 00:05:35,860 --> 00:05:36,700 Dollar sign. 93 00:05:37,090 --> 00:05:39,490 Two or three or two later. 94 00:05:40,240 --> 00:05:42,640 So this will show us something like this. 95 00:05:42,790 --> 00:05:43,180 Who? 96 00:05:44,230 --> 00:05:46,600 OK, so this is where the first one, the second one? 97 00:05:46,870 --> 00:05:48,100 And here is the third one. 98 00:05:48,130 --> 00:05:55,270 So if I want to print, for example, three here like this, it will bring the eye only. 99 00:05:55,270 --> 00:05:57,010 So one to three. 100 00:05:57,190 --> 00:06:03,760 OK, by the way, the EDUCARE is a huge again, but we barely scratched the surface here. 101 00:06:04,180 --> 00:06:11,410 I'm just giving you a high level understanding of the tool or that or this language. 102 00:06:12,130 --> 00:06:13,690 Also, we have the head command. 103 00:06:14,470 --> 00:06:15,640 So for example. 104 00:06:16,620 --> 00:06:20,070 Let's get the results fight here. 105 00:06:20,340 --> 00:06:23,670 For example, the one we have previously on the test. 106 00:06:23,910 --> 00:06:25,020 Let's see what's inside it. 107 00:06:25,560 --> 00:06:26,900 You can see the test. 108 00:06:26,910 --> 00:06:30,000 It has that desktop document downloads, whatever. 109 00:06:30,480 --> 00:06:32,040 Now we can use the hit command. 110 00:06:32,190 --> 00:06:38,130 By the way, men hid, it will print the first number of fights or part of fights. 111 00:06:38,310 --> 00:06:42,990 OK, so clear the screen hit this text. 112 00:06:43,530 --> 00:06:49,110 You can see it will hit or print the first 10 lines of the test. 113 00:06:49,380 --> 00:06:54,990 But this because it is already have, I think it is 10 lines. 114 00:06:55,230 --> 00:06:57,650 So let's hit the five here. 115 00:06:57,660 --> 00:07:01,920 But the Dash five option, it would bring the first five lines. 116 00:07:02,220 --> 00:07:02,610 OK. 117 00:07:02,640 --> 00:07:05,340 As you can see, one two three four five only. 118 00:07:05,910 --> 00:07:08,160 And again, we have the kill command. 119 00:07:08,670 --> 00:07:10,140 Dash five as well. 120 00:07:10,350 --> 00:07:11,580 Just the text. 121 00:07:12,120 --> 00:07:18,030 And this will print that the last five lines of the fight. 122 00:07:18,510 --> 00:07:20,040 OK, so far so good. 123 00:07:20,280 --> 00:07:22,590 By the way, we can hit. 124 00:07:23,560 --> 00:07:24,280 The first. 125 00:07:25,200 --> 00:07:32,520 Lines and we can take the first two lines, which is music and pictures, so it will be like this and 126 00:07:32,790 --> 00:07:34,560 tell this to. 127 00:07:36,410 --> 00:07:43,640 Like this, it will show us this will give us the first five lines, and till that stool, which is 128 00:07:43,670 --> 00:07:45,140 the last two fights. 129 00:07:46,020 --> 00:07:46,430 Right? 130 00:07:46,520 --> 00:07:46,910 Could.