Do remember how I told you that many system administrators do mistake on the first line of the script.
So let's talk about siobhán and why it is important.
But first let's create a new directory called Bash.
You know we can create file I don't.
Sh h.
And on the first line just type Shabak followed by bin bash
for text we want to display on the screen output.
We use echo command.
Basically everything you open after keyboard Echo will be displayed on the output of the script.
As will the current directory.
And if we type on the echo it will print empty line.
Now some command about output of P.W. the command
and of course we can finish script by using BWT safe changes and we do our editor using ls command.
I will check what permissions are set for file and we just created.
I will change permissions by granting exec permission for everyone.
And of course using US you can check that everything is set up correctly.
Now I can run the script and it's working perfectly.
So now let's talk about the siobhán.
I will firstly display script content using got commom
But the question is why it is called siobhán the first character is called Shop.
You can for example notice this symbol in famous programming language.
C-Sharp the second character exclamation mark is in the slang called Ben.
Why.
Because whenever divorce Benke is used especially in comics it is followed by exclamation mark.
Now put those two characters together sharp and bank and vote you get is Shaban many people using shebang.
But it means still the same characters.
Now everything that follows siobhán.
In our case sledged been slashed bash means that this interpreter is invoked to ram our script basically.
In other words it is called sledged been slash and bash to ram our script.
And this is how it looks like what is executed behind the scene.
Bin bash dot slash in the name of our script as the dot slash represents the current directory.
Basically it means the expression been Bash and name of our script.
Here's just one note.
You don't need at all to use Shabangu line.
If you vote call your script each time with an interpreter as we did now with bin bash but in a real
world this wouldn't happen.
As no one prefers to run the script by prepending interpreter a name before name of the script.
It is always better to specify it on the shebang line in your script.
So now let's create a copy of our script and do some experiment.
I will create that I do.
S H I said copy and now open your script
and change interpretor from bin bash to bin and
save changes and it does editor
now from descript
see that there is no output type ls command and where it is dry.
That as age descript was removed as if you basically did the following.
We called our n common with one argument Our screen name.
So that led to removing our script.
Let's create a screen
and we can see now that we have only tried to do it as a file so let's rename it to try Daut s h.
Now open right as I age in anti-Torah
and change interpretor from bin bash to something that doesn't exist for example been Swash.
And we can make some common here by putting sharp character
save your changes and go back to term you know if we now around our script we get better interpreter
Noddy's and it's correct because men isolation doesn't exist.
I have made it up now open again.
Our script we can firstly remove our common and change interpreter to be in a stage
now save changes and then run the script
many administrators use been a stage and they sometimes fring that it is pointing been beshe and they
are right in most cases been as age points to been beshe.
But in my case you can see that it points to Desch.
It is in my case because you want to change default system shall be as age to Desch.
So remember when you will deploy your script to another machine always check that interpreter you have
used for script is also present on another machine.
Otherwise you are risking.
That script won't work as expected.