From cfae9b28ad53aebefd90165cb25484a43f1d2347 Mon Sep 17 00:00:00 2001 From: Mingye Wang Date: Fri, 18 Sep 2015 21:51:26 -0400 Subject: [PATCH] Updated SC2002 (markdown) --- SC2002.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SC2002.md b/SC2002.md index 7c5d2be..706efc7 100644 --- a/SC2002.md +++ b/SC2002.md @@ -2,11 +2,16 @@ ### Problematic code: - cat file | tr ' ' _ +```sh +cat file | tr ' ' _ | grep a_ +``` ### Correct code: - tr ' ' _ < file +```sh +tr ' ' _ < file | grep a_ +< file tr ' ' _ | grep a_ # notice: simple commands only -- won't work with componds +``` ### Rationale: