On 11/01/2013 14:10, Peter A. Cejchan wrote:
   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)

Under Linux, you have to switch the syntax between escaped and literal
parenthesis, this works fine:

      | 9 sed 's/(//; s/\(.*\))/\1/'

Nicolas

Reply via email to