From 3cc610b2ac5c3eb9b18e20318b058f79ddc9d664 Mon Sep 17 00:00:00 2001 From: Darren Lin Date: Sun, 11 Aug 2013 19:09:29 -0700 Subject: [PATCH] added the cut command and extended bash --- .cheat/bash | 9 +++++++++ .cheat/cut | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 .cheat/cut diff --git a/.cheat/bash b/.cheat/bash index be3b8fc..1d024ca 100644 --- a/.cheat/bash +++ b/.cheat/bash @@ -3,3 +3,12 @@ for file in `ls .`; do echo 'file'; echo 'found'; done + +To implement a case command: +case "$1" +in + 0) echo "zero found";; + 1) echo "one found";; + 2) echo "two found";; + 3) echo "three found";; +esac diff --git a/.cheat/cut b/.cheat/cut new file mode 100644 index 0000000..442aa39 --- /dev/null +++ b/.cheat/cut @@ -0,0 +1,2 @@ +To cut out the third field of text or stdoutput that is delimited by a #: +cut -d# -f3