syntax:pe

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
syntax:pe [2021/12/10 08:11]
ajrou [From the end]
syntax:pe [2021/12/10 08:11]
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%Be*}'' ​                   | Be liberal in what you accept, and Be conservative <​del>​in what you send</​del> ​ | +| ''​${MYSTRING%in*}'' ​                   | Be liberal in what you accept, and Be conservative <​del>​in what you send</​del> ​ | 
-| ''<​nowiki>​${MYSTRING%%Be*}</​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 Be conservative in what you send</​del> ​ |
  
-The second form nullifies variables that begin with ''​Be'',​ by working from the end.+The second form nullifies variables that begin with ''​in'',​ by working from the end.
 ==== Common use ==== ==== Common use ====
 __**How the heck does that help to make my life easier?**__ __**How the heck does that help to make my life easier?**__
  • syntax/pe.txt
  • Last modified: 2021/12/10 08:12
  • by ajrou