On Tue, Apr 16, 2013 at 03:52:14PM +0200, Markus Armbruster wrote: > 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.
Nice :). Stefan