in reply to Re: reading/writing to a file
in thread reading/writing to a file
I agree that using Unix utilities is a good alternative for this problem, but note that
can be replaced with a single sort command:sort foo.txt | uniq
sort -u foo.txt
(BTW, if anyone knows how to avoid the temporary file above, I'd love to hear about it.)% (comm -2 -3 sorted_new.txt sorted_exclude.txt; < dict.txt) | sort -u + \ > tmp % mv tmp dict.txt
the lowliest monk
|
|---|