I'm still new at shell scripting
I want to assign * to a variable an print it. Write now I'm just printing it with:
echo -e "\052"
`cmd` to capture a command's output. The
$(...) form is preferred because it's easier to nest.
var=$(echo -e "\052")
The shell will interpret escape sequences inside
$'...'. That's single quotes with a dollar sign in front.
Or of course you could write the asterisk directly. Quote it to prevent wildcard expansion.
When you print it, make sure to quote the variable. It's annoying to always have to type double quotes any time you use a variable, but it's usually the right thing to do.
echo "$var" # yes echo $var # no