Gentoo Archives: gentoo-user

From: Adam Carter <adamcarter3@×××××.com>
To: Gentoo User <gentoo-user@l.g.o>
Subject: [gentoo-user] script help - removing newlines
Date: Wed, 08 Dec 2021 06:16:03
Message-Id: CAC=wYCHzMhJXh1r1cWcGQJF8zrz0vBQd=WjGPGrQp-5GWW72sQ@mail.gmail.com
1 I have text files that are sometimes;
2
3 property "something"
4
5 comment "whatever"
6
7
8
9 but sometimes there are newline characters in the comment field;
10
11 property "something"
12
13 comment "something
14
15 something else
16
17 a third thing"
18
19
20
21 I want to replace any newlines between 'comment "' and the next '"' with
22 spaces so the whole comment is on a single line. How can it be done?

Replies

Subject Author
Re: [gentoo-user] script help - removing newlines Michael Orlitzky <mjo@g.o>
[gentoo-user] Re: script help - removing newlines Tavis Ormandy <taviso@×××××.com>