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