oh i gotcha, the -c; i need this thing on open streams though

i guess it's trivial to implement what i need - i did so with lua in a
couple line

On Tue, Apr 23, 2019 at 7:51 AM JP <rlntls...@gmail.com> wrote:
>
> it should print the line the first time it sees it and not print the
> repeats, in my opinion
>
> On Tue, Apr 23, 2019 at 11:45 AM Andreas Krey <a.k...@gmx.de> wrote:
> >
> > On Tue, 23 Apr 2019 05:51:19 +0000, JP wrote:
> > > I had a need to run uniq on an open stream.  It doesn't seem to print
> > > the most recent line.
> > >
> > > $ lua -e 'print("a");print("b");print("c"); repeat until false' |uniq
> > > a
> > > b
> > >
> > > ^ should print the c as well, no?
> >
> > Yes, but. 'uniq -c' can only print the 'c' line once it gets a different 
> > input line
> > or EOF, and I'd bet that the code doesn't try to behave differently when 
> > run without -c.
> >
> > (Behaviour is different from GNU coreutils uniq; also:
> >
> >    netbsd$ uniq --help
> >    uniq: uniq: No such file or directory
> >
> > )
> >
> > - Andreas
> >
> > --
> > "Totally trivial. Famous last words."
> > From: Linus Torvalds <torvalds@*.org>
> > Date: Fri, 22 Jan 2010 07:29:21 -0800

Reply via email to