ref: bb31b4651128711bee7ec6e1eecb90f1a0f0175e mrsh/test/word.sh -rw-r--r-- 422 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

echo ""
echo "Tilde Expansion"
echo ~ ~/stuff # ~"/stuff"
echo ~root
#a=~/stuff
#echo $a

echo ""
echo "Parameter Expansion"
a=a
b=B
hello=hello
echo $a ${b} ">$a<"
echo \$a '$a'
#echo ${a:-BAD} ${idontexist:-GOOD}
#echo ${#hello}

echo ""
echo "Command Substitution"
echo $(echo asdf)
echo `echo asdf`

echo ""
echo "Arithmetic Expansion"
#echo $((1+2))

# Field Splitting
# Pathname Expansion
# Quote Removal