On Fri, Jun 24, 2011 at 3:59 AM, Erik Christiansen <[email protected]>wrote:
[...] > $ echo G1 X53.6223 Y37.9513 Eggnog F2300 | sed -re 's/( E)([0-9]+)/ A\2/' > G1 X53.6223 Y37.9513 Eggnog F2300 > There is still a potential problem: comments will be modified if they contain ' Ennn'. $ echo "G1 X53.6223 Y37.9513 Eggnog F2300 (MSG, Move to point E1 )" | sed -re 's/( E)([0-9]+)/ A\2/' G1 X53.6223 Y37.9513 Eggnog F2300 (MSG, Move to point A1 ) You aren't likely to run into it since you are using a RepRap, and are using CAM instead of handwritten, commented code. Luckily your RepRap won't have a gearbox, so you don't need to worry about "Shift to gear E1" being changed to "Shift to gear A1" I'm not nearly enough of a sed guru to tell you how to make it ignore matches within parenthesis. Mark Mark ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense.. http://p.sf.net/sfu/splunk-d2d-c1 _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
