Variables are used to store a value that can be changed.
We basically have silly ways in how to assign a value to a variable.
First one is explicit definition where we assign some value to a variable using equal sign.
Second option is to use eddied command where we store some user input into variable so that option is
command substitution.
And basically we are storing here output of some command into a variable.
Now let's look more deeply on the first wé how to assign value to a variable.
Explicit definition for explicit definition.
We are using the name of deplorable.
He represents a survivor equal sign and a value.
We want to sign into variable.
Keep in mind that you cannot do any spaces next to the equal sign which is hard if you already have
a word with some programming languages.
But it has a very good reason and I will tell you later in this lecture.
But now let's check some more examples of explicit definition.
Count equals five.
Here you can see that we can store number but equals Wardley.
We can definitely store a path into a variable dogs number equals a.
In most programming languages this would be the correct way how to assign value 8 into variable called
dog's number.
But do remember what I told you at the beginning.
In beshe when we are assigning value to a variable we cannot have any space next to equal sign.
Why is that because of all the Bessy's is not an assigning Barbash instead.
Things that you want to try to run a command called Dachs number with two arguments equal sign is the
first Egmond and number 8 is the second argument.
It is really important to keep in mind that only UNIX like systems when we call some command we starting
by calling the name of that command.
There is the space and some arguments we can take as an example as common here we have Alpers space
and Desch L as their first argument and because we can use in bash system commands such as our s b w
d changement measure needs some way.
How to differentiate between calling some commands and assigning some value to a variable.
So because of that we don't use any spaces next to equal sign in beshe when assigning value to a variable
as we can see in another example.
We can store it into variabilis some text but when we want to store some sentence we need to use apostrophes
to properly store a whole sentence.
If we don't do that you would think that in our examples we are trying to ram a command body after assigning.
But you may have noticed that I am using variable names in capital letter.
This is not needed.
You can definitely use global reggae's if you want but in most scripts it's a variable represented by
a capital letter.
So my recommendation is stick to that convention.
Now let's check how we can access the variables we are accessing variables by prepending dollar sign
before the name of a variable.
But instead of talking write some script to see how it is behaving.