We have just successfully created the new executable script called Script Dot s h.
And we have successfully executed it using the absolute or relative path to location of the script.
Here are three different examples for execution of this script.
But we are not able to access it like this.
And if you want to do so, you need to modify both variable.
But first, let's create new subfolder in the home directory for this user Bogdan user.
And inside of it we will place this script file.
And afterwards we will add a path to this bin folder, to this path variable.
Let's do that.
Let's first create new folder called Bill here in the home directory for this user.
And here I see this folder.
And now let's move this script dot as h file into this bin folder.
For that, I'll use command and deem and move scrape the dot as h to be scraped dot as H.
Like so.
And now if I list the contents of the bin folder I'll seek script dot s h file.
Here inside.
Let's see little bean.
And here type B wdm print rucking directory.
And I see a full path to being folder.
And now I need to take this path and concatenate it to this path variable.
For that, you need to the following.
Let's cross to corporate this section and next type following comment.
Expert Beth equals sign.
Dollar sign.
Beth next column.
And let us know.
Based Corbitt path to being folder.
What this comment will do.
It will take existing path a variable and concatenate to it.
This section, please don't forget to add your column and afterwards this resulting path will be exploded
into path variable and technically we will or overwrite existing path a variable.
Let's try to press, enter and see what will happen.
Let's use echa and type and now path variable.
And now I see that this section was concatenated to produce Barthe variable.
And no, I am able to execute that script that is located inside of the bin folder here in home, use
a directory for Bowdon user.
Anywhere I want.
Let's try to do that.
For example, here in bin folder type simply script dot as age without any franticness, without any
battles like.
So let's press enter.
And I see result.
Script was executed successfully.
Hello.
From the custom script.
I called Cindy for example, to root directory like so and enter a same command script dot as H and
result will be the same.
And the reason for that is that now this creep is located in the path here and I am able to access it
anywhere I want.
And of course, if you want to, you could even remove this extension and the name described without
an extension at all.
For example, let's rename it to, let's say, my script without extension.
Let's use MVC command.
And here I need to use the absolute or relative path to this script file.
And let's use a relative path home directory.
Here we'll be been squeezed to dot s h and less or name it to Bill.
And here we'll be simply my script without any extensions like so Antara and no list.
Right to execute this my script simply type my script and the result is the same.
And if I the contents of the bin folder like, so let me do that.
Let's actually add the dash owl option.
I'll again see that this file is as a suitable script.
It is in green color.
And here I see executable permissions for a specific user for owner of this file.
That's how you could pretty fast and easily a low execution of an executable script from anywhere.
By adding a path where the script is located to path variable like we did here.
Right.
That's all for this lecture.
And this all actually about the executable suites and permissions.
I will show you how to create more complicated scripts.
And if you want, you could do so.
Actually, executable script is simply set of shell commands.
Nothing else.
You are able to perform any actions you like.
You could create variables you could to perform any other actions, like list files, a grep output
of some commands.
And so one script is simply set of commands that are executed one by one.
All right.
That's all for this subsection.
And next, let's talk about networking in Linux systems.
I'll see you next.
Bye bye.