https://github.com/skn437/skn-shell-utils
A Simple Utility Library For Shell Script
https://github.com/skn437/skn-shell-utils
bash-script library linux shellscript
Last synced: about 1 month ago
JSON representation
A Simple Utility Library For Shell Script
- Host: GitHub
- URL: https://github.com/skn437/skn-shell-utils
- Owner: skn437
- License: mit
- Created: 2024-05-10T09:01:15.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-05T23:17:49.000Z (about 1 year ago)
- Last Synced: 2025-03-06T00:23:42.685Z (about 1 year ago)
- Topics: bash-script, library, linux, shellscript
- Language: Shell
- Homepage:
- Size: 43 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SKN Shell Script Utility Library

> Shell Script
[](https://github.com/skn437/skn-shell-utils/releases/tag/v1.4.3) [](https://opensource.org/license/mit)
## **_Introduction:_**
### This is a simple Shell Script Utility Library
### Since I use Linux, I made this library so that I can use it in all of my projects including in `GitHub Action`, `Docker` without writing the same codes over and over again
## **_Details:_**
### **`Basic` Functions:**
- delete_directory (takes 1 argument)
- delete_file (takes 1 argument)
- copy_directory (takes 2 arguments)
- copy_file (takes 2 arguments)
- move_directory (takes 2 arguments)
- move_file (takes 2 arguments)
### **`Color` Functions: Each takes 1 argument**
- black
- black_bold
- red
- red_bold
- green
- green_bold
- yellow
- yellow_bold
- blue
- blue_bold
- purple
- purple_bold
- cyan
- cyan_bold
- white
- white_bold
### **`Message` Functions: Each takes 1 argument**
- show_action_completion_message
- show_error_message
- show_success_message
- show_info_message
### **`Package` Functions: Each takes no argument**
- apt_prepare (updates, upgrades, autoremoves `apt`. Only for `debian` based linux distributions)
- brew_prepare (updates, upgrades, autoremoves, cleans up `Homebrew`)
## **_Use Case:_**
- Linux OS
- MacOS
## **_Usage:_**
### To install, open the terminal & do the following
> ```bash
> curl -sSL https://raw.githubusercontent.com/skn437/skn-shell-utils/master/build.sh | sh
> ```
### Inside your shell script, you can import the scripts like this to get the library
> ```bash
> source "$HOME/.shell-lib/ssu/main.sh"
> ```
### For `Basic` functions, use it like following
> ```bash
> delete_directory "path to the directory"
> delete_file "path to the file"
> copy directory "path to the input directory" "path to the output directory"
> copy_file "path to the input file" "path to the output file"
> move_directory "path to the input directory" " path to the output directory"
> move_file "path to the input file" "path to the output file"
> ```
### For `Color` functions, use it like following
> ```bash
> blue "message here"
> red "message here"
> ```
### For `Message` functions, use it like following
> ```bash
> show_error_message "this message will be printed red with cross mark"
> show_success_message "this message will be printed green with tick mark"
> show_info_message "this message will be printed blue with book info mark"
> show_action_completion_message "action name here"
> ```
### For `Package` functions, use it like following
> ```bash
> apt_prepare
> brew_prepare
> ```
## **_Dedicated To:_**
- 👩🎨`Prodipta Das Logno` & 🧛♀️`Atoshi Sarker Prithula`: The two most special ladies of my life. My best wishes will always be with you two. May you two always be happy.
- 💯`My Parents`: The greatest treasures of my life ever.
## **_License:_**
Copyright (C) 2024 SKN Shukhan
Licensed under the MIT License