#!/bin/sh
#
#< Show contents of $HOME/bin and count files
#
# PURPOSE: Print long ls listing of ~/bin contents. Useful
# for checking when my scripts were last modified, and
# getting a count
#
BIN_FILE=~/tmp/BINTEMP.tmp.v
ls -l ~/bin/ > ~/tmp/BINTEMP.tmp
grep -v ^total ~/tmp/BINTEMP.tmp > $BIN_FILE
TOTAL_FILES=`awk 'END{print NR}' $BIN_FILE`
echo "TOTAL FILES IN ~/bin : $TOTAL_FILES" >> $BIN_FILE
# display on stdout
cat $BIN_FILE
# clear up
rm -f ~/tmp/BIN*.tmp*
exit 0
# End of script