Bash Variables & Quoting
Quoting controls how Bash expands variables and splits words. Prefer "$var".
Example
#!/bin/bash
name="Chris App"
echo Hello $name
echo "Hello $name"
echo 'Hello $name'
today=$(date +%F)
echo "Today is $today"How to run it
- Save it to a file.
- Run
chmod +x filename.shwhere applicable. - Run it from the terminal.