Mailinglist Archive: opensuse (818 mails)

< Previous Next >
Re: [opensuse] Java script assistance (slightly OT)
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Mon, 19 Sep 2011 10:17:02 +0200
  • Message-id: <j56tpt$p9h$>
Peter Nikolic wrote:

Hi .

This is slightly OT but not too bad i hope .

I have a numbver of .js files that are strung out in one huge line of
text they are a real pain to do anything with and take an age to load
and edit

Is there a way other than sitting ther and manually sorting the of
doing it automatically ..

You could try something like this:

sed -e 's/{/\n{/' -e s'/}/}\n/' <filename

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

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