Hands-on task
This task is step 1 of the course “Bash: expansions, arrays and quoting”
Default value
Write a script /root/greet.sh that prints Hello, <name> from the first argument, and if no argument is given — Hello, stranger. Use substitution with a default value.
Reference:Variables and expansions
What you'll practise:
- bash
- parameter substitution
- ${:-}
- default values
- positional parameters