It's simple, but every time I need to look it up
Archive of posts filed under the tips category.
OpenVPN LDAP authentication
Authenticate VPN users against LDAP
Text replacement in context/out of context
An added twist to the usual search/replace problems.
Look for multiple patterns in files
One of the most FAQ of all times.
Remove duplicates, but keeping only the last occurrence
Again on IRC, somebody asked how to remove duplicates from a file, but keeping only the last occurrence of each item. The classic awk idiom awk '!a[$0]++' prints only the first instance of every line. So if the input is, for example foo bar baz foo xxx yyy bar the "normal" output (ie using the […]