commit c61a1cacf13d68049528414bf8158005121baf66
parent ec0e0612f21e41ebca5c9a0b4e41bad446566202
Author: Jacob R. Edwards <n/a>
Date: Wed, 20 Oct 2021 14:58:45 -0700
Add script to count occurrences of certain characters
Note that due to the rc function of the same name you must invoke
it as 'c c'.
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/local/bin/bin/c b/local/bin/bin/c
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Copyright 2021 Jacob R. Edwards
+# Count characters
+
+tr -cd -- "${@:-'
+'}" | wc -c