4 ms·
Does: sort < foo | uniq -u not work with named pipes?
by derleth 13y ago
Does:
sort < foo | uniq -u
not work with named pipes?
- dllthomas 13y agoIt 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.
- knz42 13y agoThis 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.
- dllthomas 13y agoIt'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.
- jl6 13y agoIt 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.