Hands-on task
This task is step 7 of the course “Bash: expansions, arrays and quoting”
Here-string
Write a script /root/wc.sh that prints the number of words in its first argument by passing it to wc via a here-string (<<<). For example, one two three four → 4.
Reference:wc
What you'll practise:
- here-string
- <<<
- wc
- standard input