O'Reilly logo

Linux Shell Scripting Cookbook by Sarath Lakshman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Texting and Driving

In this chapter, we will cover:

  • A basic regular expression primer
  • Searching and mining "text" inside a file with grep
  • Column-wise cutting of a file with cut
  • Determining the frequency of words used in a given file
  • A basic sed primer
  • A basic awk primer
  • Replacing strings from a text or file
  • Compressing or decompressing JavaScript
  • Iterating through lines, words, and characters in a file
  • Merging multiple files as columns
  • Printing the nth word or column in a file or line
  • Printing text between line numbers or patterns
  • Checking palindrome strings with a script
  • Printing lines in the reverse order
  • Parsing e-mail address and URLs from text
  • Printing a set number of lines before or after a pattern in a file
  • Removing a sentence in a file containing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required