#!/bin/sh
echo -n "a1: "; read a1
echo -n "d: "; read d
echo -n "max: "; read max

let i=1 #ciklusszamlalo
let tmp=a1

while [ `expr $tmp + $d` -lt $max ]
do
  echo A\(z\) $i. elem: $tmp
  let tmp=$tmp+$d
  let i++
done
echo Az aktualis elem $tmp, a\(z\) $i. lepesben lepett ki a ciklus.