On 09/04/2021 23:49, Daniel Shahaf wrote:
Yet another variant: pd() case $+1 in (0) popd;; (1) pushd "$1";; esac Or if golfing: pd()$# $1;0()popd;1()pushd $1
Daniel thanks for these I suspect that the case-esac structure is a neglected control structure. One way or another we are all golfers all seeking an elegant solution.