summaryrefslogtreecommitdiff
path: root/.local/bin/cs
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@simplelittledream.com>2023-01-19 19:42:29 -0500
committerJacob McDonnell <jacob@simplelittledream.com>2023-01-19 19:42:29 -0500
commit1135ed7b98574797f6e6b99eb1604d42afff5059 (patch)
treed295236c3e1d2c80bf4a1ff39bafacb20adf496a /.local/bin/cs
parent26334cc3cf49a3e1afb1eb5a40599bb97cc3b5f1 (diff)
parent56919b86e5e8612e3cf432eb5b9a110f4526f0eb (diff)
Merge branch 'macOS' of github.com:JacobMcDonnell/dotfiles into macOS
Diffstat (limited to '.local/bin/cs')
-rwxr-xr-x.local/bin/cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/.local/bin/cs b/.local/bin/cs
new file mode 100755
index 0000000..9819dbd
--- /dev/null
+++ b/.local/bin/cs
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+echo $@
+
+[ -z "$(echo $@ | grep "\-l")" ] && str="a-z A-Z" || [ -z "$(echo $@ | grep "\-u")" ] && str="A-Z a-z" || (echo "cs: missing operand" && exit)
+[ -z "$(echo $@ | sed 's/\-l//g;s/\-u//g')" ] && words=$(< /dev/stdin) || words="$(echo $@ | sed 's/\-l//g;s/\-u//g')"
+
+echo $words | tr $str
+