#!/usr/local/bin/rexx

PARSE ARG sta

IF sta='' THEN sta='dns.conf'

'/bin/cat 'sta' >FIFO'

DO WHILE QUEUED()>0
   PARSE PULL line
   IF left(line, 1)=';' THEN SAY '#'left(line, 79)';#'
   ELSE DO
      PARSE VAR line zona koja h1 h2 h3 rest
      SAY 'zone "'koja'" {'
      SAY '   type 'zona';'
      SAY '   file "'h2'";'
      SAY '   masters { 'h1'; };'
      SAY '   }'
   END
END
