TIP: Click on subject to list as thread! ANSI
echo: os2rexx
to: All
from: Jonathan de Boyne Pollard
date: 1999-09-10 13:08:09
subject: FOREACHLINE.CMD

/* 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)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.