summaryrefslogtreecommitdiff
path: root/scripts/cs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cs')
-rwxr-xr-xscripts/cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/cs b/scripts/cs
new file mode 100755
index 0000000..f3090ba
--- /dev/null
+++ b/scripts/cs
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ -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
+