Hacker News new | past | comments | ask | show | jobs | submit login

It works fine.

The advantage to

    cat foo | sort | uniq -u
is that it is (marginally) easier to drop in another filter in front of sort.



This argument is less strong in the face of:

  <foo  sort | uniq -u
(redirections can be at the beginning too.)

Also: sort -u instead of sort|uniq.


It's still a reason to disprefer the form that was given. I don't see any reason to prefer the cat version over yours, except habits, though. That said, there's only weak reason to avoid the cat.


It is also simpler, in the sense that it presents a left-to-right order that visually illustrates the pipeline, without the incongruous left-facing angle bracket.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: