[Techtalk] finding added lines in a file
Miriam English
mim at miriam-english.org
Fri Aug 16 23:26:47 UTC 2013
Little Girl wrote:
> I don't know how to do it with diff, cmp, or comp, but here it is
> with comm:
>
> comm -1 -3 <(sort A.txt) <(sort B.txt)
Oops, I meant comm, not comp. My brain is still a bit fuzzy. :)
I haven't used parentheses like that. I usually use backticks, but this
might actually be clearer. More for me to learn. Thanks for that.
Much more concise that my complicated uniq stuff, but has the problems
arising out of sort throwing away context (which I didn't mention until
later, sorry).
Thanks Little Girl,
- Miriam
--
If you don't have any failures then you're not trying hard enough.
- Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
-----
Website: http://miriam-english.org
Blogs: http://miriam-e.dreamwidth.org
http://miriam-e.livejournal.com
More information about the Techtalk
mailing list