In a previous video I had shown you how to display all arguments and how it is hard to see any difference
between dollar sign and dollar sign us that is option in this video.
I will show you the difference.
But first let's talk more about entering our field separator Internet field separator is used by the
shell to determine how to do vord sprinting to see its current value.
We can use set by Greb I ever use.
If you remember a previous section we talk about displaying or arguments using dollar sign as that is
which is expense.
As one string dollar sign one see dollar sign to C and so on where the C is the first character of internal
field separator which is in our case space.
So now let's open our previously created script argument.
Does SH
and just add a line.
I have us equals and inside a book with action marks both comma.
Now save the script
and the
can you see the difference.
Now for option or argument of a dollar sign or.
We can now see all arguments separated with the comma.
Great.
Now let's make something simple on how to assign arguments in into variables.
Create fire arguments to that as they age
start with siobhán
and let's write some comment here to know that we are going to assign arguments into variable
to assign first argument into variable first.
Just type first equals don't assign one.
Similarly you can do that the same for second argument.
Let's make it more interesting and assume that if you want to know the result of first argument plus
second argument we can do it easily with.
And now we just print the and
now we can save the file
and we also need to change permission.
Now we can then I will pass two arguments.
First is to second is five and WA two plus five equals seven.
Great working perfectly.