#!/bin/sh -e

remaining=$1

while [ "${remaining}" -gt 0 ]; do
  printf '%b' "${remaining}\033[0K\r"
  sleep 1
  : $((remaining--))
done
