Declaration Mechanism: User-Defined Variables

Learn how to operate user-defined variables.

Declare a variable

Here is an example. Let’s suppose that we want to declare a variable called filename. It stores the README.txt file name. The variable declaration looks like this:

filename="README.txt"

Run the commands discussed in this lesson in the terminal below.

Get hands-on with 1200+ tech skills courses.