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:
Search in decimal rather than hex. od dumps the character list, cut to remove offsets, sort -u gives the used characters. seq gives the comparison list, but we need this sorted alphabetically for comm, which does the filtering. I drop to perl to convert back to characters (is there a better way?) and then use od to dump them in a print-safe format.
If both file1 and file2 are already sorted:
comm -13 file1 file2 > file-new
You can use any dictionary you want, in any language.
This command will output all single-word annotations that you have underlined in your Kindle device (provided the file) given a list of language-specific words.
If you want to learn vocabulary, this command is ideal.
the comm utility (opposite of diff) show commonalities in files (in this case strings)
It just colorizes the line based on if it has 0, 1 or 2 tabs at the beginning of the line. Won't work so well if lines already begin with tabs (too bad comm doesn't have an option to substitute \t for something else).
Don't forget comm needs input files to be sorted. You can use a shortcut like this with bash: comm