#!/bin/bash
#make executeable with "chmod +x"
#then place in /usr/bin/
totalLines=0
FILES=*
for f in $FILES
do
if [[ $f == "numOfLines.sh" ]]; then
continue
fi
echo "Processing $f..."
lines=$(cat $f | wc -l)
totalLines=$(($lines + $totalLines))
done
echo
echo "Total num of lines in all files:"
toilet $totalLines