![[Toc]](../../toc.gif)
![[Index]](/idx.gif)
Self-recreating program
This is a program that recreates itself if called; save it as mother.cmd
and try
mother.cmd>daughter.cmd
Here's the code (author: Ian Collier (see EMail Addresses); ensure that
there are only the three lines in your cmd and delete all leading and
trailing blanks if you cut and paste the code!):
/* REXX */
p="/* REXX */";r="say p;say %p=%%%p%%%;r=%%%r%%%%;say translate(r,%22%x,%25%x)"
say p;say "p="""p""";r="""r"""";say translate(r,"22"x,"25"x)
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs