#!/bin/sh BUFIFS=$IFS IFS= i=0 while read line do i=`expr $i + 1` echo $i":"$line done