Hands-on task
This task is step 3 of the course “Bash: expansions, arrays and quoting”
Substring replacement
Write a script /root/repl.sh that replaces all spaces in its first argument with underscores and prints the result. For example a b c → a_b_c.
Reference:Variables and expansions
What you'll practise:
- parameter substitution
- ${var//from/to}
- substring replacement
- bash scripts