summaryrefslogtreecommitdiff
path: root/bin/common
diff options
context:
space:
mode:
Diffstat (limited to 'bin/common')
-rwxr-xr-xbin/common/length4
-rwxr-xr-xbin/common/line5
2 files changed, 9 insertions, 0 deletions
diff --git a/bin/common/length b/bin/common/length
new file mode 100755
index 0000000..8527dfa
--- /dev/null
+++ b/bin/common/length
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -eu
+printf '%s' "$1" | wc -c
+
diff --git a/bin/common/line b/bin/common/line
new file mode 100755
index 0000000..9a2556e
--- /dev/null
+++ b/bin/common/line
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -eu
+
+head -n "$1" | tail -n 1
+