Oops sorry to all for my very noisy replies... I just see you omitted the 's' argument to sed ! We've got it !
Bye, Vincent. Le samedi 18 mars 2017 à 10:45 -0700, Rich Shepard a écrit : > On Sat, 18 Mar 2017, Vincent Bain wrote: > > > Rich, this should work indeed (I just tested it down here, it works)... at > > least if you have sed installed on your system. And also carefully mind > > the reverse quotes(``) that enclose subprocesses. > > Vincent, > > Yes, sed is part of all linux distributions and I've used it many times in > the past. However, it did not work here and I do use backticks to evaluate > the string between them prior to handing the results to the preceeding > command. > > Here's the verbatim command: > > for i in `g.list type=raster pattern=open_h_*`; do g.rename rast=$i,`echo > $i | sed /open_h_/blocked_h_/g`; done > > (This all on one command line; split here to fit MUA width.) > > I don't see a syntax error yet it's not working here in grass-7.3.svn. > Same error message as before for each file. > > Thanks, > > Rich > > > _______________________________________________ > grass-user mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/grass-user _______________________________________________ grass-user mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/grass-user
