for i in  `seq 1 999` ; do

                 j=$i
[ $i -le 99 ] && j="0$i"
[ $i -le 9  ] && j="00$i"


echo $(( RANDOM % 20000 + 1 )) > file$j.dat

rand=$(( 1 + RANDOM % 2 ))
[ $rand -eq 1 ] && echo $(( RANDOM % 20000 + 1 )) >> file$j.dat

rand=$(( 1 + RANDOM % 2 ))
[ $rand -eq 1 ] && echo $(( RANDOM % 20000 + 1 )) >> file$j.dat

done

for file in file*dat ; do

	rand=$(( 1 + RANDOM % 10 ))
 if [ $rand -eq 1 ] ; then
	 echo "-999" > $file
 fi

done

