Reputation: 11286
#!/bin/bash
if [ ! $1 ]
then
echo "no param"
else
set FAV_COLOR=$1
echo "My fav color is ${FAV_COLOR}"
fi
This is not working how I expected:
>favcol.sh blue
My fav color is FAV_COLOR=blue
Any thoughts?
Upvotes: 4
Views: 9424