Utils.sh
:shell: Complex Types for shell. String, Map, Set, Stack, Date, Random and others
Install / Use
/learn @torokmark/Utils.shREADME
Shell Utils
This repo is intended to extend the shell and contain useful and readable functions that help developers to maintaine their scripts easier and neatly.
The following packages (which basically functions) are available.
- Console : provides formatted printing to the console
- Date : provides rich date functionality
- Import : provides improved import over source command
- Random : provides readable way of using randoms
- Files : provides tests against files in a neat way
The next container based packages are also available
- Aggregate : provides the aggregate or set functionality
- Map : provides functionality over the assosiative type
- Queue : provides the queue type functionality
- Stack : provides the implementation and functionality of a stack
And String as well
- String : provides string functionality with well-known methods
Documentation
Github Wiki doc is available here: https://github.com/torokmark/utils.sh/wiki
How to install
It requires Bash 4.4 or higher.
Check out the repository and source the file which you want to use.
How to use
source 'queue.sh'
# I create a queue called fruits
queue create fruits
# put an element to queue
queue enqueue fruits apple
queue peek fruits
queue destroy fruits
For more information, take a look at the utils wiki page: wiki
Contribute
- If you are intended to contribute the project, please take a look at shell script style guide
- Fork this repository
- Make your changes
- Send an RP
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
