Monday, 19 August 2013

How do we separate variables from letters in shell scripting

How do we separate variables from letters in shell scripting

I tried printing "Dogs are the best." with this bash script.
#!/bin/bash
ANIMAL="Dog"
echo "$ANIMALs are the best."
exit
However, I got " are the best." printed out instead because the s in
$ANIMALS is not separated from the variable. How do I separate it?

No comments:

Post a Comment