Abstract
An important part of working on the Linux command line consists of working with text files. If you need to configure services, they’ll store their configuration in text files. If you need to write program code, you’ll do that in a text file as well. Linux text files are all over your computer, and to be good at the Linux command line, you’ll have to know how to handle them. In this chapter, you’ll learn how to work with text files. Different methods are discussed for manipulatin the contents of them. First, you’ll learn about the only editor that matters on Linux, Vi. Next, I’ll explain different ways of displaying the contents of text files. After that, we’ll talk about some useful utilities that help you in sorting and comparing the contents of different text files—and more. You’ll then learn how regular expressions can help you in finding text patterns in a file in a clever way. You’ll also read how the programmable filters sed and awk can help you batch-manipulate text files. At the end of this chapter, you’ll also get familiar with some of the most useful commands in command-line printing.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2009 Sander van Vugt
About this chapter
Cite this chapter
(2009). Working with Text Files. In: Beginning the Linux Command Line. Apress. https://doi.org/10.1007/978-1-4302-1890-6_4
Download citation
DOI: https://doi.org/10.1007/978-1-4302-1890-6_4
Publisher Name: Apress
Print ISBN: 978-1-4302-1889-0
Online ISBN: 978-1-4302-1890-6
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books