t/t4018: avoid two unnecessary sub-shell invocations