############################################################################ # # File: vrepl.icn # # Subject: Program to replicate input lines # # Author: Ralph E. Griswold # # Date: January 14, 1999 # ############################################################################ # # This file is in the public domain. # ############################################################################ # # This program replicates every line of standard input a specified # number of times and writes the result to standard output. The # replication factor is given on the command line. # ############################################################################ procedure main(args) local i, line i := integer(args[1]) | 1 while line := read() do every 1 to i do write(line) end