1
00:00:04,380 --> 00:00:09,420
We have just successfully created the new executable script called Script Dot s h.

2
00:00:09,900 --> 00:00:16,710
And we have successfully executed it using the absolute or relative path to location of the script.

3
00:00:16,860 --> 00:00:20,160
Here are three different examples for execution of this script.

4
00:00:20,670 --> 00:00:23,130
But we are not able to access it like this.

5
00:00:24,130 --> 00:00:27,870
And if you want to do so, you need to modify both variable.

6
00:00:28,230 --> 00:00:33,690
But first, let's create new subfolder in the home directory for this user Bogdan user.

7
00:00:34,140 --> 00:00:37,530
And inside of it we will place this script file.

8
00:00:37,860 --> 00:00:42,740
And afterwards we will add a path to this bin folder, to this path variable.

9
00:00:43,410 --> 00:00:43,850
Let's do that.

10
00:00:44,220 --> 00:00:49,710
Let's first create new folder called Bill here in the home directory for this user.

11
00:00:49,950 --> 00:00:51,660
And here I see this folder.

12
00:00:52,090 --> 00:00:57,030
And now let's move this script dot as h file into this bin folder.

13
00:00:57,300 --> 00:01:04,920
For that, I'll use command and deem and move scrape the dot as h to be scraped dot as H.

14
00:01:04,980 --> 00:01:05,489
Like so.

15
00:01:05,950 --> 00:01:10,740
And now if I list the contents of the bin folder I'll seek script dot s h file.

16
00:01:10,860 --> 00:01:11,720
Here inside.

17
00:01:12,310 --> 00:01:13,400
Let's see little bean.

18
00:01:13,790 --> 00:01:17,840
And here type B wdm print rucking directory.

19
00:01:18,180 --> 00:01:21,230
And I see a full path to being folder.

20
00:01:21,690 --> 00:01:27,630
And now I need to take this path and concatenate it to this path variable.

21
00:01:29,230 --> 00:01:30,530
For that, you need to the following.

22
00:01:30,760 --> 00:01:34,780
Let's cross to corporate this section and next type following comment.

23
00:01:35,320 --> 00:01:38,230
Expert Beth equals sign.

24
00:01:38,320 --> 00:01:39,210
Dollar sign.

25
00:01:39,350 --> 00:01:41,350
Beth next column.

26
00:01:41,710 --> 00:01:42,740
And let us know.

27
00:01:42,750 --> 00:01:45,220
Based Corbitt path to being folder.

28
00:01:45,910 --> 00:01:47,440
What this comment will do.

29
00:01:47,890 --> 00:01:52,550
It will take existing path a variable and concatenate to it.

30
00:01:52,600 --> 00:02:00,330
This section, please don't forget to add your column and afterwards this resulting path will be exploded

31
00:02:00,700 --> 00:02:06,820
into path variable and technically we will or overwrite existing path a variable.

32
00:02:07,300 --> 00:02:10,240
Let's try to press, enter and see what will happen.

33
00:02:10,570 --> 00:02:13,840
Let's use echa and type and now path variable.

34
00:02:14,380 --> 00:02:19,810
And now I see that this section was concatenated to produce Barthe variable.

35
00:02:20,900 --> 00:02:27,020
And no, I am able to execute that script that is located inside of the bin folder here in home, use

36
00:02:27,020 --> 00:02:28,460
a directory for Bowdon user.

37
00:02:28,850 --> 00:02:29,990
Anywhere I want.

38
00:02:30,680 --> 00:02:31,980
Let's try to do that.

39
00:02:32,000 --> 00:02:38,660
For example, here in bin folder type simply script dot as age without any franticness, without any

40
00:02:38,660 --> 00:02:39,440
battles like.

41
00:02:39,440 --> 00:02:41,000
So let's press enter.

42
00:02:41,120 --> 00:02:42,020
And I see result.

43
00:02:42,200 --> 00:02:44,630
Script was executed successfully.

44
00:02:44,990 --> 00:02:45,350
Hello.

45
00:02:45,380 --> 00:02:46,520
From the custom script.

46
00:02:47,270 --> 00:02:54,220
I called Cindy for example, to root directory like so and enter a same command script dot as H and

47
00:02:54,240 --> 00:02:55,580
result will be the same.

48
00:02:56,240 --> 00:03:02,450
And the reason for that is that now this creep is located in the path here and I am able to access it

49
00:03:02,540 --> 00:03:03,590
anywhere I want.

50
00:03:04,160 --> 00:03:09,470
And of course, if you want to, you could even remove this extension and the name described without

51
00:03:09,470 --> 00:03:10,640
an extension at all.

52
00:03:10,880 --> 00:03:15,300
For example, let's rename it to, let's say, my script without extension.

53
00:03:15,710 --> 00:03:17,010
Let's use MVC command.

54
00:03:17,120 --> 00:03:21,680
And here I need to use the absolute or relative path to this script file.

55
00:03:22,010 --> 00:03:24,800
And let's use a relative path home directory.

56
00:03:25,190 --> 00:03:29,910
Here we'll be been squeezed to dot s h and less or name it to Bill.

57
00:03:30,230 --> 00:03:36,770
And here we'll be simply my script without any extensions like so Antara and no list.

58
00:03:36,770 --> 00:03:43,580
Right to execute this my script simply type my script and the result is the same.

59
00:03:45,130 --> 00:03:49,120
And if I the contents of the bin folder like, so let me do that.

60
00:03:50,260 --> 00:03:52,680
Let's actually add the dash owl option.

61
00:03:53,500 --> 00:03:57,060
I'll again see that this file is as a suitable script.

62
00:03:57,160 --> 00:03:58,140
It is in green color.

63
00:03:58,330 --> 00:04:04,330
And here I see executable permissions for a specific user for owner of this file.

64
00:04:05,260 --> 00:04:11,560
That's how you could pretty fast and easily a low execution of an executable script from anywhere.

65
00:04:11,770 --> 00:04:17,950
By adding a path where the script is located to path variable like we did here.

66
00:04:19,240 --> 00:04:19,529
Right.

67
00:04:19,880 --> 00:04:20,930
That's all for this lecture.

68
00:04:20,959 --> 00:04:24,830
And this all actually about the executable suites and permissions.

69
00:04:25,240 --> 00:04:28,010
I will show you how to create more complicated scripts.

70
00:04:28,100 --> 00:04:29,750
And if you want, you could do so.

71
00:04:30,020 --> 00:04:33,950
Actually, executable script is simply set of shell commands.

72
00:04:34,020 --> 00:04:34,850
Nothing else.

73
00:04:35,080 --> 00:04:37,430
You are able to perform any actions you like.

74
00:04:37,460 --> 00:04:42,770
You could create variables you could to perform any other actions, like list files, a grep output

75
00:04:42,770 --> 00:04:43,400
of some commands.

76
00:04:43,490 --> 00:04:48,980
And so one script is simply set of commands that are executed one by one.

77
00:04:50,060 --> 00:04:50,450
All right.

78
00:04:50,630 --> 00:04:52,100
That's all for this subsection.

79
00:04:52,160 --> 00:04:55,430
And next, let's talk about networking in Linux systems.

80
00:04:55,700 --> 00:04:56,450
I'll see you next.

81
00:04:56,540 --> 00:04:56,910
Bye bye.

