1
00:00:06,799 --> 00:00:13,289
So first you set to delete the fifth line of the
value users that you created in lesson five in lesson six lab.

2
00:00:13,820 --> 00:00:20,466
So let's do cat on users and
there we can see that this is

3
00:00:20,466 --> 00:00:27,113
the line that we are going to
Delete. So set -i5d on users and

4
00:00:27,113 --> 00:00:33,759
now showing it again. And as you
can see the swift line is gone.

5
00:00:34,640 --> 00:00:41,439
Second part was to use awk in a pipe
to filter the first column out of the results of

6
00:00:41,439 --> 00:00:48,239
the command psaox. So this is psaox and we
need awk. So I would use AWK print $1.

7
00:00:51,920 --> 00:00:56,950
AWK is pretty good at finding a field
separator that is based on spaces and depths.

8
00:00:57,450 --> 00:01:00,270
And as you can
see that is working pret.

9
00:01:01,200 --> 00:01:06,150
Next we use grep to show names of all files
in etc that have lines starting with the text root.

10
00:01:06,650 --> 00:01:10,585
That would be grep l
because we need the names

11
00:01:10,585 --> 00:01:14,520
of vals and not
specifically the contents in etc.

12
00:01:15,879 --> 00:01:19,935
And we are looking for
what? Well, let's do the

13
00:01:19,935 --> 00:01:23,990
regular expression before the
where we want to search.

14
00:01:24,730 --> 00:01:30,969
We are looking for lines that are starting with root
and maybe we want to make that case insensitive as well.

15
00:01:31,680 --> 00:01:35,620
And oh boy, that's a
lot of errors and so on.

16
00:01:36,239 --> 00:01:42,680
So sudo grab il and why
wouldn't we make that recursive as well?

17
00:01:44,599 --> 00:01:49,340
There I need to enter my sudo password
again. And here we have all of these files.

18
00:01:50,060 --> 00:01:55,555
Then use grep to show all lines in
the file users that contain three letters N.

19
00:01:55,555 --> 00:02:01,050
You know what I would go for?
I would go for grep nnn in users.

20
00:02:02,310 --> 00:02:04,890
Doesn't have to be
much harder than that.

21
00:02:06,170 --> 00:02:10,155
Is that correct? If I
don't see a result, then I

22
00:02:10,155 --> 00:02:14,139
want to make sure that
we are doing the right thing.

23
00:02:14,800 --> 00:02:17,909
Well, the right thing kind of depends
on how you want to do it.

24
00:02:18,770 --> 00:02:21,439
Maybe we should interpret
it in a different way.

25
00:02:23,189 --> 00:02:26,210
Like this for instance. And
then we have a match.

26
00:02:27,169 --> 00:02:30,030
That's how we can
interpret it as well. Right?

27
00:02:30,250 --> 00:02:35,283
All lines in the values that contain
three letters n. Nothing states that there

28
00:02:35,283 --> 00:02:40,316
can't be anything in between the letters
n. So the dot star that I've

29
00:02:40,316 --> 00:02:45,349
inserted in the pattern is for
zero or more characters between the n's.

30
00:02:46,650 --> 00:02:51,723
And then the last one, find
all lines ending with well, that should

31
00:02:51,723 --> 00:02:56,796
be text $in users. And there
we can see all lines ending with

32
00:02:56,796 --> 00:03:01,870
the text Anna. And that's it.
Let's move on to the next lesson.
