From b96a7cf17fc181925fb890ca7594dbc4e3b97dd0 Mon Sep 17 00:00:00 2001 From: Lynne Williams Date: Sun, 17 Feb 2013 11:25:41 -0500 Subject: [PATCH] Update shell_cheatsheet.md --- shell_cheatsheet.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell_cheatsheet.md b/shell_cheatsheet.md index c40cd6a..1ae4974 100644 --- a/shell_cheatsheet.md +++ b/shell_cheatsheet.md @@ -78,12 +78,13 @@ A special kind of redirection is called a pipe and is denoted by `|`. |---------|-------------------------------------------------------------------------------------------------------------------------------------------------------| | `|` | Output from one command line program can be used as input to another one (e.g. `ls *.md | head` gives you the first 5 `*.md` files in your directory) | + * Combining single-purpose filters with pipes is the most productive way to use the shell... * a program conforms that to Unix conventions, it can easily be combined with others... Example: - ls *.md | head | sed -i \`s/markdown/software/g\` + ls *.md | head | sed -i `s/markdown/software/g` changes all the instances of the word `markdown` to `software` in the first 5 `*.md` files in your current directory. -- 2.26.2