last.sh: find the last issued commands that match the pattern