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


Subject: [OT] alternative recursive cmd-line [was: proof that development work should be done on unix]
From: Mike Nordell (tamlin@algonet.se)
Date: Thu Feb 22 2001 - 03:24:01 CST


> find . -type f -name '*.c*' -exec sh -c "(echo '1,\$s/(XML_Char *\*)
*\"/\"/g';echo wq)|ed {}" \; >/dev/null

This would run ecqually cool on e.g. BeOS. :-)

But what about something like the following for win32?

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

Note that the "&" isn't to remove the process from the current TTY, it's
more like ";" for a *nix shell.

It isn't bash, and it is a little longer, but it does actually do the job.
Not that I endorse use of M$, just to display that it can be done. :-)

/Mike



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