[REBOL] Re: Combining bits that are the same
From: greggirwin:mindspring at: 24-Jul-2003 8:27
Hi Andrew,
AM> Notice how there are similarities? I'd like to express that similarity
AM> in one function with a kind of "programmable" action. I get the feeling
AM> that the Unix "GREP" command could be similar to what I want, but I've
AM> got no familiarity with Unix or the GREP command. Anyone know if GREP
AM> would a good model or goal to work towards with Rebol?
Both AWK and Grep can operate on sets of files. Grep is used for
finding data in files; AWK lets you execute actions and do actual
programming type stuff. What they do is iterate over files for you,
which is the common bit that saves you time and effort. AWK also
splits each line into fields automatically so you don't have to parse
them yourself. Sed is used to make changes to files, while Grep isn't
(though some implemenations may support it).
I've got a simple AWK-like thing, and a basic GREP-ish thing on top of
that, but only notes on a SED-like tool. I think they are very useful
models, but can be made much friendlier than their namesakes.
-- Gregg