I'm trying to use the bash substring built-in to replace the output of a subshell or another bash function.
The following commands works quite well in zsh; but results in a
bad substitution error in bash:
the output should be the last folder of the
$PWD, replaced by
latest when my current directory is
/home/user/trunk should become
Is there a bash equivalent allowing to chain strings editions without relying on variables or pipes ? Or do bash built-ins only allows the input to be a string or a plain variable ?