44 lines
620 B
Plaintext
Executable File
44 lines
620 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%cd}
|
|
echo ${var%%cd}
|
|
echo ${var%c*d}
|
|
echo ${var%%c*d}
|
|
echo ${var%?}
|
|
echo ${var%%?}
|
|
echo ${var%*}
|
|
echo Empty:${var%%*}
|
|
|
|
echo end
|