1
00:00:01,260 --> 00:00:05,770
Variables are used to store a value that can be changed.

2
00:00:05,910 --> 00:00:12,470
We basically have silly ways in how to assign a value to a variable.

3
00:00:12,480 --> 00:00:20,450
First one is explicit definition where we assign some value to a variable using equal sign.

4
00:00:20,450 --> 00:00:30,020
Second option is to use eddied command where we store some user input into variable so that option is

5
00:00:30,110 --> 00:00:31,390
command substitution.

6
00:00:31,490 --> 00:00:37,230
And basically we are storing here output of some command into a variable.

7
00:00:37,220 --> 00:00:43,400
Now let's look more deeply on the first wé how to assign value to a variable.

8
00:00:43,400 --> 00:00:48,780
Explicit definition for explicit definition.

9
00:00:48,920 --> 00:00:51,610
We are using the name of deplorable.

10
00:00:51,660 --> 00:00:56,370
He represents a survivor equal sign and a value.

11
00:00:56,390 --> 00:00:58,880
We want to sign into variable.

12
00:00:58,940 --> 00:01:05,960
Keep in mind that you cannot do any spaces next to the equal sign which is hard if you already have

13
00:01:05,960 --> 00:01:08,040
a word with some programming languages.

14
00:01:08,210 --> 00:01:12,560
But it has a very good reason and I will tell you later in this lecture.

15
00:01:12,800 --> 00:01:17,530
But now let's check some more examples of explicit definition.

16
00:01:19,730 --> 00:01:21,360
Count equals five.

17
00:01:21,380 --> 00:01:26,480
Here you can see that we can store number but equals Wardley.

18
00:01:26,780 --> 00:01:33,810
We can definitely store a path into a variable dogs number equals a.

19
00:01:34,180 --> 00:01:40,750
In most programming languages this would be the correct way how to assign value 8 into variable called

20
00:01:40,870 --> 00:01:41,990
dog's number.

21
00:01:42,400 --> 00:01:45,400
But do remember what I told you at the beginning.

22
00:01:45,610 --> 00:01:55,240
In beshe when we are assigning value to a variable we cannot have any space next to equal sign.

23
00:01:55,260 --> 00:02:00,740
Why is that because of all the Bessy's is not an assigning Barbash instead.

24
00:02:00,880 --> 00:02:09,600
Things that you want to try to run a command called Dachs number with two arguments equal sign is the

25
00:02:09,600 --> 00:02:13,710
first Egmond and number 8 is the second argument.

26
00:02:14,380 --> 00:02:22,290
It is really important to keep in mind that only UNIX like systems when we call some command we starting

27
00:02:22,300 --> 00:02:25,000
by calling the name of that command.

28
00:02:25,330 --> 00:02:35,870
There is the space and some arguments we can take as an example as common here we have Alpers space

29
00:02:36,500 --> 00:02:44,690
and Desch L as their first argument and because we can use in bash system commands such as our s b w

30
00:02:44,690 --> 00:02:47,880
d changement measure needs some way.

31
00:02:47,890 --> 00:02:54,820
How to differentiate between calling some commands and assigning some value to a variable.

32
00:02:54,890 --> 00:03:03,500
So because of that we don't use any spaces next to equal sign in beshe when assigning value to a variable

33
00:03:06,250 --> 00:03:09,060
as we can see in another example.

34
00:03:09,070 --> 00:03:17,470
We can store it into variabilis some text but when we want to store some sentence we need to use apostrophes

35
00:03:17,740 --> 00:03:20,410
to properly store a whole sentence.

36
00:03:20,710 --> 00:03:28,700
If we don't do that you would think that in our examples we are trying to ram a command body after assigning.

37
00:03:28,700 --> 00:03:35,590
But you may have noticed that I am using variable names in capital letter.

38
00:03:35,590 --> 00:03:36,990
This is not needed.

39
00:03:37,000 --> 00:03:43,930
You can definitely use global reggae's if you want but in most scripts it's a variable represented by

40
00:03:43,930 --> 00:03:45,360
a capital letter.

41
00:03:45,370 --> 00:03:48,880
So my recommendation is stick to that convention.

42
00:03:50,100 --> 00:03:58,350
Now let's check how we can access the variables we are accessing variables by prepending dollar sign

43
00:03:58,620 --> 00:04:00,990
before the name of a variable.

44
00:04:01,200 --> 00:04:05,790
But instead of talking write some script to see how it is behaving.
