jld: (vessel)
Jed Davis ([personal profile] jld) wrote in [community profile] command_liners 2010-11-03 12:25 am (UTC)

Other thing: #blah and %blah will take off the shortest match, while ##blah and %%blah will remove the longest. Also, all of these just give the unchanged value if there's no match.

This can be useful for things like ${foo##*/}, or for generalizing those pairs to more things.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting