Text Processing

HLedger is a perfect tool for generating financial reports. However, it lacks one important functionality: the boolean "OR" operator for combining queries. It is better to demonstrate the problem using a specific example. Let's generate an example hledger journal file with a decent number of transactions and accounts used. For …

Sometimes it is useful to keep the header of an output of some command while grepping the same output for something else. In the example below, the column information is absent:

A solution without regular expressions

There are many ways for selecting columns in a delimited text. The easiest ones require GNU awk, cut and Perl. Let's consider the following file:

A draft of the new version of the book "Speech and Language Processing (3rd ed. draft)" by Dan Jurafsky and James H. Martin is available on authors' website. Although it is produced using pdflatex with hyperref, the bookmarks of the table of contents (TOC) have an incorrect hierarchy. However, the …

Sometimes large books or theses may contain many chapters, section and subsections. Reading such PDF documents with the whole table of contents hierarchy shown in the bookmarks panel may be difficult. There is a way to tell PDF viewers to show only a specific level of bookmarks and hide its …