#!/bin/sh # num-on-lines -- give the number of fields on each line of the given file # # AUTHOR: Gary T. Leavens [ -n "$echo" ] && set -x USAGE="Usage: $0 [file]" if test $# -gt 1 then echo "$USAGE" >&2 exit 1 fi awk ' { print NF }' $1