From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <50F00109.3070900@yahoo.fr> References: <50F00109.3070900@yahoo.fr> Date: Fri, 11 Jan 2013 14:10:57 +0100 Message-ID: From: "Peter A. Cejchan" To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] How to do this with [acme | sam | sed ] ? Topicbox-Message-UUID: 05ec8124-ead8-11e9-9d60-3106f5b1d025 > echo 'abcd(x+(y-z))efgh' | sed 's;\(;;' | sed 's;(.*)\);\1;' Thanks, this is fine for my purpose (porting from C to Go), thanks! Just removing parens around for and if statements on a single line. | 9 sed 's/\(//; s/(.*)\)/\1/' (linux's sed does not work with it) best, ++pac