#! /bin/bash
# Last edited on 2024-03-30 18:05:35 by stolfi

files=( "$@" )

printf "\n" 
printf "  lines   words     bytes file        \n" 
printf "------- ------- --------- ------------\n" 

for f in "${files[@]}" ; do
  if [[ ".${f##*.}" == ".gz" ]]; then
    printf "%7d %7d %9d %s\n" `zcat $f | wc` "${f%.*}"
  else
    printf "%7d %7d %9d %s\n" `cat $f | wc` "$f"
  fi
done
