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:
Text Processing
Using regular expressions with Perl, sed and grep for selecting columns in delimited text
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:
1 2 3 4 |
[johndoe@ArchLinux]% cat |
Fixing the table of contents bookmarks in the book “Speech and Language Processing (3rd ed. draft)” by Dan Jurafsky and James H. Martin
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 …
Modifying bookmark opening levels of PDF documents using Coherent PDF Command Line Tools (cpdf)
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 …