Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ut-dillo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!ut-sally!ut-ngp!ut-dillo!darin From: darin@ut-dillo.UUCP (Darin Adler) Newsgroups: net.lang.c Subject: Re: Comments on this program please... Message-ID: <239@ut-dillo.UUCP> Date: Sun, 8-Dec-85 15:46:55 EST Article-I.D.: ut-dillo.239 Posted: Sun Dec 8 15:46:55 1985 Date-Received: Tue, 10-Dec-85 05:10:36 EST References: <2389@ukma.UUCP> <3090011@csd2.UUCP> <363@codas.UUCP> <2406@ukma.UUCP> <142@decvax.UUCP> <5308@elsie.UUCP> Organization: UTexas Computation Center, Austin, Texas Lines: 18 < My apologies for following this up in net.lang.c > The shell/sed solution, is obviously an appropriate way to solve this problem, but let's not hide the simplicity of the solution while showing our shell script cleverness. The core of the sed solution is this: sed '/ROUTE/s//\\ &/g' or even: sed '/ROUTE/s//\\ ROUTE/g' Obviously, C programming is not the way to go here (unless sed is too slow?). -- Darin Adler {gatech,harvard,ihnp4,seismo}!ut-sally!ut-dillo!darin