From: Lynne Williams Date: Sun, 17 Feb 2013 16:25:41 +0000 (-0500) Subject: Update shell_cheatsheet.md X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b96a7cf17fc181925fb890ca7594dbc4e3b97dd0;p=swc-modular-shell-hello.git Update shell_cheatsheet.md --- 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.