
In this example, that value is assigned to the file_count variable. This construct $( ) evaluates the commands within the parentheses, and then returns their final value. Note there’s a dollar sign $ before the first parenthesis. This is the command phrase between the parentheses $( ).

This variable takes its value from a command substitution.

Variables provide the flexibility that makes a script a general, rather than a specific, solution. Scripts would be completely hamstrung without variables. The following command defines a new variable called drink_of_the_Year, and assigns it the combined values of the my_boost and this_year variables: drink_of-the_Year="$my_boost $this_year" echo drink_of_the-Year You can also create a variable that takes its value from an existing variable or number of variables. A variable without the dollar sign $ only provides the name of the variable.To get the value held in a variable, you have to provide the dollar sign $.Variables in quotation marks " are treated as variables.A variable in single quotes ' is treated as a literal string, and not as a variable.For now, here are some things to remember:

We’ll talk about quoting variables later. So, you can use the same command that references the same variables and get different results if you change the values held in the variables.
