ABSTRACT

This chapter describes some of the more advanced file processing operations on text and nontext files, and shows how they can be performed in Linux. These operations include sorting files, searching for files and commands in the file system structure, searching files for certain strings or patterns, performing database-like operations of cutting fields from a table or pasting tables together, transforming non- American Standard Code for Information Interchange (ASCII) files to ASCII, compressing and decompressing file contents, and encrypting and decrypting files. Several tools are available in Linux for performing these tasks. The chapter discusses the important topic of regular expressions, which are a set of rules that can be used to specify one or more strings using a sequence of special text characters. While discussing the operations, it also describes the related shell commands and tools that make use of regular expressions. The chapter gives examples to illustrate how these commands can be used to perform the required operations.