summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-28 18:24:58 +0100
committerdavidovski <david@davidovski.xyz>2022-05-28 18:24:58 +0100
commita40c67ed42dce9fe8618f06284b1de77f72ff4dd (patch)
treeae60224bdbc015df4d6d0218283c8ecd5ff14d0a /src
parentf205f143613958464e6e9e0d2dd815d76d36b631 (diff)
added reverse lines to xilib
Diffstat (limited to 'src')
-rw-r--r--src/xilib.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/xilib.sh b/src/xilib.sh
index 56e2592..736ddb6 100644
--- a/src/xilib.sh
+++ b/src/xilib.sh
@@ -20,4 +20,15 @@ checkroot () {
}
}
+# reverse the order of lines
+#
+reverse_lines () {
+ local result=
+ while IFS= read -r line; do
+ result="$line
+ $result"
+ done
+ echo "$result"
+}
+