Mailinglist Archive: opensuse (818 mails)

< Previous Next >
Re: [opensuse] Java script assistance (slightly OT)
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Tue, 20 Sep 2011 08:40:22 +0200
  • Message-id: <j59cgl$vd2$>
David Haller wrote:


On Mon, 19 Sep 2011, Per Jessen wrote:
sed -e 's/{/\n{/g' -e s'/}/}\n/g' -e s'/;/;\n/g' <filename

(still not sure if you need to escape the curly brackets).

You don't, as sed uses basic regular expressions (see 'man 7 regex'),
so you need to escape {} to get "special" behaviour (if any).

Okay, but I was more thinking of escaping for the shell - for instance,
when you use () for grouping, they need to be escaped to work. Which I
think(!) is a shell issue, not sed ?

Per Jessen, Zürich (10.4°C)

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups