#!/bin/bash -i
# v2 from 170712: introduce loop to work around GNU coreutils issues with pipe/fifo/isatty

if [[ -z "$COLUMNS" ]] ; then
	MYCOL=$(tput cols)
else
	MYCOL=${COLUMNS}
fi

tail "$@" | while read line; do
	echo "$line" | expand | cut -c1-${MYCOL:-80}
done
