I find it a bit worrisome that the commandline that is printed with -P is not the same as the one that is executed if not -P (almost the same, but the basename call makes it potentially different). I'd much prefer something along the lines of
cmdline=....if [ $print] ; then echo $cmdlineelse eval $cmdlinefi
I find it a bit worrisome that the commandline that is printed with ``-P`` is not the same as the one that is executed if ``not -P`` (almost the same, but the ``basename`` call makes it potentially different). I'd much prefer something along the lines of
cmdline=....
if [ $print] ; then
echo $cmdline
else
eval $cmdline
fi