Mailing List Archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] bash question

On Tue, 2003-02-18 at 11:19, Matt Doughty wrote:
> Yeah, you know why? Because intuitively you expect sed to be the right
> tool for the job, but it wasn't, and that is largely due to sed's 
> brain dammaged approach to newlines.  A google wasn't going to find
> him, and answer.  The question he asked was very much a fringe question,
> and you have to look no further than my twisted solution, the only one
> that actually used sed, to see that the problem exactly easy to figure
> out.

Just by googling 5 minutes, I found this solution, which works (i.e. it
merges lines 1 & 2).

sed -e "1 N;s/\n/ /"

My 2c about this discussion.


GPG Key: 653514E5 (
Real Men do not use signatures.

Attachment: signature.asc
Description: This is a digitally signed message part

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links