#!/bin/sh # The 5 most recent logins command -v last > /dev/null 2>&1 || { echo "last not found" >&2; exit 1; } last -5 | head -n 5