[OSM-dev] Search & Replace in #bash

Gary68 gary at gary68.de
Sat Oct 30 14:38:40 BST 2010



sed -i s/id=\"-/id=\"/g testfile

sed -i s/id=\'-/id=\'/g testfile

-i = in place

s = replace

g = globally



On Sat, 2010-10-30 at 14:35 +0200, Peter Herison wrote:
> Hi
> 
> I try to automate the process of creating a PDF-Map for a special
> project. The OSM-Date are entered in JOSM, so all ways and nodes have
> negative IDs and REFs. To used some texteditor to do a search and
> replace. When I tried
> xxx at xxx-VirtualBox:~$ sed -s "s/id'-/id'/g" data.osm
> or
> xxx at xxx-VirtualBox:~$ sed -s "s/id\'\-/id\'/g" data.osm
> but nothing is replaced.
> 
> Any idear?
> 
> 
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev





More information about the dev mailing list