On 08/16/2014 02:44 PM, Mike Wright wrote:
if [ -n $# ]
then
WORDS=$1
else
WORDS="these are some words"
fi
echo $WORDS;
The second case is always comes back "".
But if I write
WORDS='these are some words'
echo $WORDS
I get the assigned string.
In your first example, you use full quotes (") but in your second, you
use single ('). Try using single quotes and see if it makes a difference.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org