summaryrefslogtreecommitdiff
path: root/bin/common
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-11-08 15:36:51 +0100
committerRaymaekers Luca <luca@spacehb.net>2025-11-08 15:36:51 +0100
commit1c9e478e8528a80faa1e7e88ef8f21f9dfb20b14 (patch)
tree949f8c8758796688352849df118753bd42719779 /bin/common
parent7605cd078a079eb8cbbc86053e49173acc8525ff (diff)
checkpointmain
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
+