#!/bin/sh

M=$1

i=0
while [ $i -lt 15000 ]; do
  r=`expr $i % 1000`
  d=a
  if [ $M -ne 0 ]; then
    if [ $r -eq 5 ]; then
      d=b
    fi
  fi
  echo "line $i: This is line number $i, This is line number $i, $d This is line number $i"
  i=`expr $i + 1`
done
