Last change
on this file since 3707 was 3320, checked in by Bruno Cornec, 10 years ago |
- Re-add (thanks git BTW) the 2.2.9 branch which had been destroyed in
the move to 3.0
|
-
Property svn:executable
set to
*
|
File size:
793 bytes
|
Rev | Line | |
---|
[3320] | 1 | unset var
|
---|
| 2 |
|
---|
| 3 | echo Empty:${var#}
|
---|
| 4 | echo Empty:${var##}
|
---|
| 5 | echo Empty:${var#*}
|
---|
| 6 | echo Empty:${var##*}
|
---|
| 7 | echo Empty:${var%}
|
---|
| 8 | echo Empty:${var%%}
|
---|
| 9 | echo Empty:${var%*}
|
---|
| 10 | echo Empty:${var%%*}
|
---|
| 11 |
|
---|
| 12 | var=
|
---|
| 13 |
|
---|
| 14 | echo Empty:${var#}
|
---|
| 15 | echo Empty:${var##}
|
---|
| 16 | echo Empty:${var#*}
|
---|
| 17 | echo Empty:${var##*}
|
---|
| 18 | echo Empty:${var%}
|
---|
| 19 | echo Empty:${var%%}
|
---|
| 20 | echo Empty:${var%*}
|
---|
| 21 | echo Empty:${var%%*}
|
---|
| 22 |
|
---|
| 23 | var=ababcdcd
|
---|
| 24 |
|
---|
| 25 | echo ${var#ab}
|
---|
| 26 | echo ${var##ab}
|
---|
| 27 | echo ${var#a*b}
|
---|
| 28 | echo ${var##a*b}
|
---|
| 29 | echo ${var#?}
|
---|
| 30 | echo ${var##?}
|
---|
| 31 | echo ${var#*}
|
---|
| 32 | echo Empty:${var##*}
|
---|
| 33 | echo ${var#}}_tail
|
---|
| 34 | echo ${var#\}}_tail
|
---|
| 35 |
|
---|
| 36 | echo ${var%cd}
|
---|
| 37 | echo ${var%%cd}
|
---|
| 38 | echo ${var%c*d}
|
---|
| 39 | echo ${var%%c*d}
|
---|
| 40 | echo ${var%?}
|
---|
| 41 | echo ${var%%?}
|
---|
| 42 | echo ${var%*}
|
---|
| 43 | echo Empty:${var%%*}
|
---|
| 44 | echo ${var#}}_tail
|
---|
| 45 | echo ${var#\}}_tail
|
---|
| 46 | echo ${var%\\*}
|
---|
| 47 |
|
---|
| 48 | a=ab}; echo ${a%\}};
|
---|
| 49 | a=abc; c=c; echo ${a%${c}}
|
---|
| 50 | a=ab{{c; echo ${a%`echo {{c`}
|
---|
| 51 |
|
---|
| 52 | echo End
|
---|
Note:
See
TracBrowser
for help on using the repository browser.