Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Re: bash question
- Date: Tue, 18 Feb 2003 23:34:06 +0900
- From: Matt Doughty <wyndigo@example.com>
- Subject: Re: [tlug] Re: bash question
- References: <3E50D037.80506@example.com> <20030217132033.577e6ffd.gstewart@example.com> <20030217215230.GB29479@example.com> <3E518FB3.6010205@example.com> <20030218021940.GA9902@example.com> <1045548251.5059.16.camel@example.com> <20030218135812.GA2820@example.com>
- User-agent: Mutt/1.4i
On Tue, Feb 18, 2003 at 02:58:12PM +0100, Tobias Diedrich wrote: > bruno raoult wrote: > > > Just by googling 5 minutes, I found this solution, which works (i.e. it > > merges lines 1 & 2). > > > > sed -e "1 N;s/\n/ /" > > Interesting. I would not have this expected to work because > sed -e 's/\n/ /' > does nothing, but it actually does work... Yep, I missed that one. *wipes the egg off his face* It was a simple search to. Anyway, the reason it works is that sed removes the newlines at the end of the line before processing, and puts them back on after processing. It is however possible to match against a newline, and sed doesn't touch embedded newlines before processing. Unfortunately, the sed manual on NetBSD is less than forth coming about what a pattern space is in sed space making the manual a chore to read. --Matt
- References:
- [tlug] bash question
- From: Jean-Christian Imbeault
- Re: [tlug] bash question
- From: Godwin Stewart
- Re: [tlug] bash question
- From: Josh Glover
- Re: [tlug] bash question
- From: Jean-Christian Imbeault
- Re: [tlug] bash question
- From: Matt Doughty
- Re: [tlug] bash question
- From: bruno raoult
- [tlug] Re: bash question
- From: Tobias Diedrich
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] bash question
- Next by Date: Re: [tlug] Re: bash question
- Previous by thread: [tlug] Re: bash question
- Next by thread: Re: [tlug] Re: bash question
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links