blob: 82abe81984c579238a785c00addc4b4722e3bae6 [file] [log] [blame]
unset var
echo Empty:${var#}
echo Empty:${var##}
echo Empty:${var#*}
echo Empty:${var##*}
echo Empty:${var%}
echo Empty:${var%%}
echo Empty:${var%*}
echo Empty:${var%%*}
var=
echo Empty:${var#}
echo Empty:${var##}
echo Empty:${var#*}
echo Empty:${var##*}
echo Empty:${var%}
echo Empty:${var%%}
echo Empty:${var%*}
echo Empty:${var%%*}
var=ababcdcd
echo ${var#ab}
echo ${var##ab}
echo ${var#a*b}
echo ${var##a*b}
echo ${var#?}
echo ${var##?}
echo ${var#*}
echo Empty:${var##*}
echo ${var#}}_tail
echo ${var#\}}_tail
echo ${var%cd}
echo ${var%%cd}
echo ${var%c*d}
echo ${var%%c*d}
echo ${var%?}
echo ${var%%?}
echo ${var%*}
echo Empty:${var%%*}
echo ${var#}}_tail
echo ${var#\}}_tail
echo ${var%\\*}
a=ab}; echo ${a%\}};
a=abc; c=c; echo ${a%${c}}
a=ab{{c; echo ${a%`echo {{c`}
echo End