/* FOREACHLINE.CMD -- Execute a command for all lines of input */
/*
* This is a REXX script that reads its standard input and executes the
* command that was passed as its argument for each line read, with the
* line read tacked on to the end of the command.
*
* (c) Copyright 1999 Jonathan de Boyne Pollard. All rights reserved.
*
* Permission is hereby granted for you to use, copy, modify, and redistribute
* this script to your heart's content, as long as you realise that I accept
* no responsibility for whatever posession or use of this script may do to
* your machine, data, cat, or marital status.
*/
parse arg command
do while lines() \= 0
line = linein()
if line \= '' then
'@'||command||' '||line
end
¯ JdeBP ®
--- FleetStreet 1.22 NR
346/3
* Origin: JdeBP's point, using Squish (2:257/609.3)
|