Stefan Hajnoczi <stefa...@redhat.com> writes:

[...]
> The problem with the POSIX shell string replacement is that the syntax
> is horrible.  I can never remember what ${%}, ${%%}, ${#} and
> %{##} do.  $(basename $QEMU_PROG) is clear (although it doesn't handle
> spaces in the filename!).

Here's how I cope.  # is left of % my keyboard.  # matches "on the
left", % "on the right".  #/% are "short" and pick the shortest matching
pattern.  ##/%% are "long" and pick the longest matching pattern.

Reply via email to