1
00:00:01,280 --> 00:00:10,010
Set one of the most important program you need to know when writing scripts but what it is set is a

2
00:00:10,010 --> 00:00:19,430
stream editor a stream editor is used to from Basic Text transformations on an input stream file or

3
00:00:19,460 --> 00:00:21,130
input from a pipeline.

4
00:00:22,530 --> 00:00:30,770
What is the structure of said We are starting with the keyboard set followed by some options for set

5
00:00:30,770 --> 00:00:31,670
program.

6
00:00:31,670 --> 00:00:34,150
Usually it means some features.

7
00:00:34,670 --> 00:00:44,580
Then is the actual script which will be performed for some stream input and then we specify input file.

8
00:00:44,630 --> 00:00:52,100
We can also provide input to set a program using pipe but what is the structure of it.

9
00:00:52,130 --> 00:01:01,280
Set script we concede we are starting with address which can be a line number Legwand expression or

10
00:01:01,340 --> 00:01:02,650
a range of lines.

11
00:01:03,470 --> 00:01:11,780
This otherness means dead set command which is displayed here as x symbol will be executed for lines

12
00:01:11,930 --> 00:01:22,730
we have specified in address endless byte offset script are options which can be used for some set commands.

13
00:01:23,420 --> 00:01:25,820
OK let's check some example.

14
00:01:25,950 --> 00:01:31,210
We are starting with the keyboard set as you can see we don't have any options.

15
00:01:31,400 --> 00:01:39,290
Then is the actual set script inside single quotation marks followed by input file.

16
00:01:39,340 --> 00:01:46,060
If we check more deeply the set script we are starting with others better to say with others range.

17
00:01:46,070 --> 00:01:56,080
So day to day 5 then a single letter command we have D which means delete command and it is all we don't

18
00:01:56,080 --> 00:02:04,410
have an additional command option so this example deletes lines city to 65.

19
00:02:04,540 --> 00:02:06,340
But here is good to mention.

20
00:02:06,340 --> 00:02:13,540
That said by default doesn't change input file set by default only preens.

21
00:02:13,540 --> 00:02:16,300
How do I change output looks like.

22
00:02:16,420 --> 00:02:25,810
So in our example set deletes the line 60 to 65 and provide that output if it deletes the line into

23
00:02:25,840 --> 00:02:32,730
file output Daltex file input that text itself without any change.

24
00:02:34,430 --> 00:02:45,550
Most common set commands are a visual up'n text after line the original delete button space.

25
00:02:45,560 --> 00:02:48,970
It is good to know what is a pattern space.

26
00:02:49,040 --> 00:02:54,700
It is a temporary buffer where a set held a single line of input.

27
00:02:54,980 --> 00:03:03,870
While the editing command is applied then I command which inserts text before align.

28
00:03:03,920 --> 00:03:09,790
Then we have become one it prints the pattern space.

29
00:03:09,960 --> 00:03:21,720
Then we have Q Which will exits set without processing any more commands or input s which will perform

30
00:03:21,750 --> 00:03:22,990
substitution.

31
00:03:23,370 --> 00:03:26,520
And of course there is many more commands.

32
00:03:27,120 --> 00:03:34,670
We have also some command line options for example and disables automatic printing which means dead

33
00:03:34,670 --> 00:03:35,150
set.

34
00:03:35,160 --> 00:03:40,820
Only produce output that explicitly told to we are to be common.

35
00:03:40,860 --> 00:03:45,640
Option B allows us to use another set script.

36
00:03:45,660 --> 00:03:53,220
And for example option ATA allows us to use extended regular expressions are Adorjan basic regular expression

37
00:03:54,060 --> 00:03:57,660
difference between extended and basic regular expressions.

38
00:03:57,660 --> 00:04:00,120
You can see indescretion now.

39
00:04:00,180 --> 00:04:07,630
Basically you will use backslash allot to allow some character to have special meaning by default.

40
00:04:07,630 --> 00:04:13,920
The basic Gringoire expressions are used by grep awk and set in bash scripting.

41
00:04:14,100 --> 00:04:21,460
I use extended regular expressions so deadfalls intro into said command.

42
00:04:21,460 --> 00:04:24,990
How do you feel a little overwhelmed Yes.

43
00:04:25,060 --> 00:04:33,280
It might be because from slides is hard to learn much and because of that evil practice now in bed shell

44
00:04:33,490 --> 00:04:38,780
and you will see that set commands are quite easy when you start using them.
