bug-coreutils
[Top][All Lists]
Advanced

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

Re: sort feature (can't believe this hasn't been implemented yet)


From: Edward Peschko
Subject: Re: sort feature (can't believe this hasn't been implemented yet)
Date: Fri, 21 May 2004 15:27:30 -0700
User-agent: Mutt/1.4.1i

On Fri, May 21, 2004 at 02:26:58PM -0700, Paul Eggert wrote:
> Edward Peschko <address@hidden> writes:
> 
> > So how do you do this? I see the '-z' option, but I would think
> > there would be a generic line separator option like there was a
> > field separator option.
> >
> > Is this there, or was this truly an oversight?
> 
> You're right, it's not there.  (Perhaps you could add it?....)
> 
> > I want to sort a record which has a delimiter other than a newline
> > (its a data file with a delimiter of '\<newline>' because the data
> > itself has newlines in it).
> 
> If the data doesn't have nulls, then you can turn the \<newline> into
> a null, sort that, and then turn it back to \<newline> afterwards.
> Otherwise I'm afraid you're out of luck the way things stand.

ok, well I'll endeavor to add it - although I can't believe I'm the first 
person to try to use sort to sort records from a relational database (its pretty
common practice to use multiple line delimiters because of the possibility of 
embedded newlines or other such in the data)

As for using nulls, yeah, I could hack a perl script to do that.. although,
I'm not sure that that will help if there are embedded nulls in strings/or bit 
fields in the database.

Is this a trivial change to make?

Ed




reply via email to

[Prev in Thread] Current Thread [Next in Thread]