#!/bin/bash DAT=count.dat if [ -f $DAT ] then tmpcount=`cat $DAT` else echo "Error: \"$DAT\" has not found." exit 1 fi ((count=$tmpcount+1)) cat <