Re: [OT] alternative recursive cmd-line [was: proof that development work should be done on unix]


Subject: Re: [OT] alternative recursive cmd-line [was: proof that development work should be done on unix]
From: Aaron Lehmann (aaronl@vitelus.com)
Date: Thu Feb 22 2001 - 03:29:23 CST


On Thu, Feb 22, 2001 at 10:24:01AM +0100, Mike Nordell wrote:
> > find . -type f -name '*.c*' -exec sh -c "(echo '1,\$s/(XML_Char *\*)
> *\"/\"/g';echo wq)|ed {}" \; >/dev/null
>
> But what about something like the following for win32?
You mean DOS.

> for /r %i in (*.c) do type %i | sed <replacement expression> | %i.tmp &
> del %i & ren %i.tmp %i

Is sed a standard DOS tool?

Cywin is cheating :)

sed does the trick, but ed is nice becuase it edits files in place
meaning you don't have to play .tmp tricks.



This archive was generated by hypermail 2b25 : Thu Feb 22 2001 - 03:29:48 CST