a6ad397ea9
function old new delta add_till_closing_paren 313 359 +46 builtin_exit 48 47 -1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
53 lines
793 B
Plaintext
Executable File
53 lines
793 B
Plaintext
Executable File
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
|