#!/bin/sh set -eu # shellcheck disable=2068 for f in ${@:-$(cat -)}; do if [ "$(file -i "$f" | cut -d' ' -f2 | cut -d/ -f1)" = 'text' ]; then sed 's/\t/ /g' "$f" | awk -v FNAME="$f" 'length > 80 { printf "%s:%s:%s\n", FNAME, NR, $0 }' fi done