Gentoo Archives: gentoo-user

From: Adam Carter <adamcarter3@×××××.com>
To: Gentoo User <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Re: script help - removing newlines
Date: Thu, 09 Dec 2021 05:05:38
Message-Id: CAC=wYCE4qtRh1pt_O2rBRfMEi5BH1_kxTGUR2df3yWWA=N6t1A@mail.gmail.com
In Reply to: [gentoo-user] Re: script help - removing newlines by Tavis Ormandy
1 >
2 > Hmm, maybe:
3 >
4 > $ awk '/^comment "[^"]*$/ { ORS=" " } /"$/ { ORS="\n" } { print }'
5 > yourfile.txt
6 >
7
8 Yes that works (after piping the file thru tr -d '\r' first). Thanks!