Want to see the full-length video right now for free?
We use tools every day that print text to the console. We also have files full of text. We can slice and dice all of that text to fit our needs, just by learning a few common but powerful tools. The lingua franca of the command line is plain text.
grep
is great for searching files, especially long files, for the strings you
care about. It's installed everywhere and can search files for matches, list
files that don't contain a string, and recursively search directories.
sed
("Stream Editor") is a command-line tool to transform text or a file's
contents. It applies one or more transformations to text, line-by-line, and
points out the changed text. It can also change files in place, which is handy
when you need to do a big search-and-replace across your codebase.