[GRASS-dev] batch search and replace from command line?

Markus Neteler neteler at osgeo.org
Wed Jan 9 03:18:01 EST 2008


Done and submitted:
  http://trac.osgeo.org/grass/changeset/29624

I have used attached script.

Cheers
Markus


On Jan 9, 2008 7:02 AM, Michael Barton <michael.barton at asu.edu> wrote:
> I'm betting there is a Unix command to do a batch search and replace of one
> string with another in all text files in a directory.
>
> But I don't know what it is.
>
> I'm trying to follow Glynn's advice to create a library of common TclTk
> procedures that can be called without calling another instance of gm.tcl
> (i.e., without launching another GIS Manager window).
>
> These procedures (e.g., Gm::errmsg) get called a LOT in many modules. I'd
> like a way of replacing every occurance of "Gm::errmsg" with "GmLib::errmsg"
> in all modules in the TclTk GUI directory.
>
> Can someone tell me if this is possible and, if so, how to do it?
>
> Thanks
> Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: change-string
Type: application/octet-stream
Size: 411 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20080109/5aef4242/change-string.obj


More information about the grass-dev mailing list