Hands-on task
This task is step 9 of the course “Bash scripts: from a loop to a robust script”
Quotes and spaces
Write a script /root/q.sh that prints its first argument as-is, preserving all spaces (including multiple ones). For example, the input a b (three spaces) must be printed unchanged.
Reference:Variables and expansions
What you'll practise:
- quoting
- word splitting
- parameter expansion
- bash scripts