#!/bin/bash
rm -f file*txt

for i in `seq 1 600` ; do

 MM=$(( $RANDOM % 12 + 1 ))

                                                                       DD=$(( $RANDOM % 31 + 1 ))
 [ $MM -eq 4 ] && [ $MM -eq 6 ] && [ $MM -eq 9 ] && [ $MM -eq 11 ] &&  DD=$(( $RANDOM % 30 + 1 ))
 [ $MM -eq 2 ]                                                     &&  DD=$(( $RANDOM % 28 + 1 ))

 [ $DD -le 9 ] && DD=" $DD"
 [ $MM -le 9 ] && MM=" $MM"

 grep "$DD $MM" file*txt &>/dev/null 
 if [ $? -ne 0 ] ; then 
  echo "$DD $MM" > file-$i.txt 
 fi

done
