Parameter expansion on a single variable works as expected. But how to expand parameters that comprise several variables? Example:
#!/bin/sh
foo=/lorem/ipsum; bar=dolor/sit
tmp="$foo/$bar"
printf '%s\n' "${tmp%/*}"
How to run this parameter expansion without the need of the temporary variable?