Skip to main content

Posts

Showing posts with the label tr

Using SED and TR tools for text manipulations

SED and TR command line tools are very useful tools to perform various text manipulations in Linux. You can also find them on Mac OS X, however be aware that they could work a little differently from the same tools on Linux OS. Two very simple, but extremely useful one-liners (tested on Linux Ubuntu OS). The first one is wrapping your text with a div tag and "lazyload" class, also it wraps the text into HTML comment tags. The second one-liner is removing all newline characters from the text.