Chapter 6. Manipulating Files

Chapter contents

  • Counting files and file contents

  • Viewing file beginnings

  • Viewing file endings

  • Finding text

  • Using regular expressions

  • Making global changes

  • Changing files

  • Comparing files

  • Finding differences in files (two methods)

  • Sorting files

  • Redirecting files to two locations

As you learned back in Chapter 4, you can fairly easily work with text by opening up an editor and making the changes you want. But you can do more than just copy, paste, cut, or move text in files. As we'll discuss in this chapter, you can manipulate entire files and look at specific parts of them, get information about the files, find text in files, compare files, and sort files. All kinds of neat stuff!

In this chapter, we'll use a lot of flags to augment commands. You'll find a full list of the most common commands and their flags in Appendix C if you need further explanation or a quickie reminder.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.160.131