% identifiers may not seem obvious, they have a convenient mnemonic. The # key is on the left side of the $ key on the keyboard and operates from the left. The % ke... atures to do the sorts of simple string manipulations that are commonly needed on file and path names.
Background
In traditional... (and complains if given more) and basename takes one argument and an optional one which is not a filename.
Despite their simplici... nd bash -- and I find it easier to read (since I don't have to squint at me screen wondering which direction the "tick" is slanted).
A Better Way
Although
t strongly typed.
# Bash permits integer operations and comparisons on variables
#+ whose value consists of all-integer ... & and ||, used within double brackets.
<code>[[ condition1 && condition2 ]]</code>
The -o and -a operators work with the... ho true 1>&2`" ] # (no output)
# ^^^^^^^ False condition. So far, everything as expected.
# However ...
[... `echo true 1>&2`" ] # true
# ^^^^^^^ False condition. So, why "true" output?
# Is it because both con