#!/bin/sh # Find line numbers in various files total=0 wc -l parts/*.sgml | while read n p do total=`expr $total + $n` echo "($total) $n $p" done