summaryrefslogtreecommitdiff
path: root/os1w2/func
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-02-11 15:18:24 +0100
committerlonkaars <loek@pipeframe.xyz>2023-02-11 15:18:24 +0100
commit3064926731fdbf3516e496fa1e905278defeccc3 (patch)
treeef1c1f5162404c58fd6255a243390f5ed2e27f5d /os1w2/func
parent1a79f611169d7ef128f5eb63294ba11807c5feb3 (diff)
os week 2
Diffstat (limited to 'os1w2/func')
-rwxr-xr-xos1w2/func13
1 files changed, 13 insertions, 0 deletions
diff --git a/os1w2/func b/os1w2/func
new file mode 100755
index 0000000..a194988
--- /dev/null
+++ b/os1w2/func
@@ -0,0 +1,13 @@
+#!/bin/sh
+usage() {
+ echo "$0: usage: $0 -u"
+ exit 1
+}
+
+[ -z "$1" ] && usage
+
+case "$1" in
+ "-u") id -un ;;
+ *) usage ;;
+esac
+