Bash: Variable – filename example

Variable in bash is not particularly cool until we have a good use of it  😛

> filename="myfile.txt"
> touch $filename
> ls filename
myfile.txt

> rm $filename
> ls $filename
ls: myfile.txt: No such file or directory

> files="file1 file2" 
> touch $files
> ls $files
file1
file2