December 2018
Beginner
452 pages
12h 17m
English
On to the subject of naming. You might have noticed something about the variables we've seen up to now: the Bash variables PATH and BASH_VERSION are written fully uppercase, but in our examples we used lowercase, with words separated by an underscore (hello_text). Consider the following example:
#!/bin/bash###################################### Author: Sebastiaan Tammer# Version: v1.0.0# Date: 2018-09-08# Description: Showing off different styles of variable naming.# Usage: ./variable-naming.sh###################################### Assign the variables.name="Sebastiaan"home_type="house"LOCATION="Utrecht"_partner_name="Sanne"animalTypes="gecko and hamster"# Print the story.echo "${name} lives in a ${home_type} in ${LOCATION}, ...