1 2w='@ @' 3check() { 4 [ "$v" = "$w" ] || echo "Expected $w got $v" 5} 6 7export v=$w 8check 9 10HOME=/known/value 11check() { 12 [ "$v" = ~ ] || echo "Expected $HOME got $v" 13} 14 15export v=~ 16check 17 18check() { 19 [ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v" 20} 21 22export v=x:~ 23check 24