On 2012-07-30, at 7:34 PM, Sean Walberg wrote:

Probably not the answer you want to hear now, but dude, you really need to look into puppet or cfengine. Since I know you're stuck with a bunch of different OSes, the latter might be better.

http://stackoverflow.com/questions/6744639/sed-awk-remove-lines-from-pattern-to-pattern might also help you with the sed /r, they have an example that does what you want using patterns instead of line numbers.


I do need to look into either of those. :)

In the situation/place I need to use this little gem I have zero control over the hosts but am temporarily granted escalated privileges from time to time.  When I'm done with the hosts I will probably be around to support them for a while but in that case my account is supposed to be reverted to a restricted power user.

-- 
Sean