Skip to main content

Removing duplicated lines - VIM

It is a good way to compare to list and see what you have left to do. First sort your list then, find lines that duplicate and replace with a blank space, strip empty lines and wallah. an clean list of what you have left.
:sort | %s/^\(.*\)$\n\1$// | v/./d


I was inspired by : Uniq - Removing duplicate lines - Vim Tips Wiki: "g/^\(.*\)$\n\1$/d"
Post a Comment

Popular posts from this blog

S&P Rating, tea parties and the mad hatter.

This past week the S&P downgraded the USA credit rating from AAA to AA, this now puts us on the same footing as Spain.  All in all it appears to me as part of generalized push to decapitalize and delegitimize government in general. To force the out sourcing of the key infrastructure projects to private corporate entities, much like is done in places like Nigeria, and Colombia. Whether it's the "Tea party" or not, sharks are in the water and instead of tossing our buckets overboard to lighten the load, we need to gather all hands and use them to bail ourselves out.

We all benefit when government is involved in maintaining things like access to water, electricity, roads, and basic health care. The History of this great nation is filled with examples of government subsidies going to private industry to create wealth. To think that private corporations, or even individuals have produced this wealth _ex nihilo_ with only their sweat is hubris. It is to forget that we all…