commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
% acts on every line in the file.
\s matches spaces.
\+ matches one or more occurrences of what's right behind it.
Character '$' matches end-of-line.
% selects every line in the file. 'd' deletes what's selected. It's a pretty simple combination.