#!/bin/sh -e
#
# center - print the given text in the center of screen

columns=$(tput cols)
while IFS= read -r line; do
  printf '%*s\n' $(((${#line} + columns) / 2)) "${line}"
done <<-EOF
$1
EOF
