From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d3037f71d9d26da1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-11 09:22:13 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: sed and perl - yuck [Was Re: Preprocessor functionality equivalent ideas needed] Date: Thu, 11 Dec 2003 18:12:56 +0100 Organization: AdaCL Message-ID: <1255206.8rsULcRV6F@linux1.krischik.com> References: Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1071163182 04 5183 eKNbGNtlvHGj8HE 031211 17:19:42 X-Complaints-To: usenet-abuse@t-online.de X-ID: GDcGrEZAwe73BsIub8AHksj1642os0tTPyTI1g9UMEfnQxQ8ktHzw4 User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:3387 Date: 2003-12-11T18:12:56+01:00 List-Id: Ludovic Brenta wrote: > Another approach could be to simulate a preprocessor with sed or perl > scripts. Did that, hated it and wrote AdaCL. If you rather use Ada then perl and find find sed cumbersome you should look at AdaCL. If you disagree: Write a sed line which inserst "OS." bevore every CD_Recorder - but only if it is not allready there. sarDo --serarch="CD_Recorder" --insert-before="OS." *.ad[bs] There is no limit on the amout of text changes you can to with one call the the command. But realy cool thing about AdaCL is that it is a library and sarDo is only a front end to it. If you need something more complex you can write an Ada programm to do it. See http://adacl.sourceforge.net for Details. Complete Source in GNATHTML is available online. Browse the sar* and AdaCL-SAR-* Files. With Regards Martin -- mailto://krischik@users.sourceforge.net http://adacl.sourceforge.net