diff options
| author | davidovski <david@davidovski.xyz> | 2022-05-28 18:24:58 +0100 |
|---|---|---|
| committer | davidovski <david@davidovski.xyz> | 2022-05-28 18:24:58 +0100 |
| commit | a40c67ed42dce9fe8618f06284b1de77f72ff4dd (patch) | |
| tree | ae60224bdbc015df4d6d0218283c8ecd5ff14d0a | |
| parent | f205f143613958464e6e9e0d2dd815d76d36b631 (diff) | |
added reverse lines to xilib
| -rw-r--r-- | src/xilib.sh | 11 |
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" +} + |
