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:
What happens if there is more than a single space between words, or spaces and tabs? This command will remove duplicate spaces and tabs.
The "-r" switch allows for extended regular expressions. No additional piping necessary.
There are 2 alternatives - vote for the best!
Simply translates whitespace to newlines. Could be enhanced to compress out extra newlines, but that might be better handled in the next tool down the pipe, with eg uniq(1).
Basically it creates a typical word list file from any normal text.
Puts words on new lines, removing additional newlines.
If you can do better, submit your command here.
You must be signed in to comment.