home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
historic
/
v941.tgz
/
icon.v941src.tar
/
icon.v941src
/
ipl
/
progs
/
limitf.icn
< prev
next >
Wrap
Text File
|
2000-07-29
|
902b
|
39 lines
############################################################################
#
# File: limitf.icn
#
# Subject: Program to limit throughput
#
# Author: Ralph E. Griswold
#
# Date: September 17, 1998
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program is intended to be used in a pipe line. It passes through
# at most the number of line given by the command-line option -l (default
# 10).
#
############################################################################
#
# Links: options
#
############################################################################
link options
procedure main(args)
local opts, limit
opts := options(args, "l+")
limit := \opts["l"] | 10
every write(!&input) \ limit
end