Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
syntax:pe [2021/12/10 08:12] ajrou [From the beginning] |
syntax:pe [2021/12/10 08:12] (current) ajrou [From the end] |
||
---|---|---|---|
Line 246: | Line 246: | ||
In the second form everything will be the same, except that Bash now tries to match the pattern from the end of the string: | In the second form everything will be the same, except that Bash now tries to match the pattern from the end of the string: | ||
^ Syntax ^ Result ^ | ^ Syntax ^ Result ^ | ||
- | | ''${MYSTRING%in*}'' | Be liberal in what you accept, and Be conservative <del>in what you send</del> | | + | | ''${MYSTRING%in*}'' | Be liberal in what you accept, and conservative <del>in what you send</del> | |
- | | ''<nowiki>${MYSTRING%%in*}</nowiki>'' | Be liberal <del>in what you accept, and Be conservative in what you send</del> | | + | | ''<nowiki>${MYSTRING%%in*}</nowiki>'' | Be liberal <del>in what you accept, and conservative in what you send</del> | |
The second form nullifies variables that begin with ''in'', by working from the end. | The second form nullifies variables that begin with ''in'', by working from the end. |