For example, I have been trying to say "There are 10 people online at the moment" in my script file.
I can never seem to get the command working without the "people online at the moment" part on the next line.
At the moment, I have
w='who | wc -l'
echo "There are $w people online at the moment"
However, I always end up with the output
There are who | wc -l users online at the moment
How do you get the command working in the middle? I've been trying to look and copy examples, but it doesn't seem to help my command substitution issue.
$()
myself ;-) – Anthon Dec 13 '14 at 09:31