Welcome to My Bash Script Collection repository! This repository contains a collection of useful Bash scripts that I have created for various purposes. These scripts are designed to automate tasks, simplify workflows, and improve productivity in a Linux environment.
Feel free to explore the scripts and use them according to your needs. Each script is self-contained and focuses on a specific task. You can find detailed information about each script within the script files themselves.
Here's a list of scripts available in this repository:
- powersave - Power saving tweaks
- 0x0 - Command-line tool for uploading file/url/standard-output to 0x0.st
- jpg2heic - Script that converts all .jpg format in current directory to .heic format.
- heic2jpg - Script that converts all .heic format in current directory to .jpg format.
- set-tdp - Script that sets tdp for ryzen processors using ryzenadj.
- copy - Script that copies the input which is passed through pipe.
- extract - Script that extracts various archive file formats based on their extension.
- extract-audio - Script that extracts audio from video using ffmpeg.
- add-ssh-key - Script that add public SSH key to authorized_keys for SSH key-based authentication.
- compress - Script that highly compresses files and folders using 7z.
- sysinfo-archive - Script that gathers comprehensive system information, including hardware, software, network, configuration, and creates a archive.
- jpg2avif - Script that converts all .jpg format in current directory to .avif format.
- avif2jpg - Script that converts all .avif format in current directory to .jpg format.
Please refer to the comments within each script file for a detailed explanation of its purpose, usage, and any requirements or dependencies.
-
Clone the repository to your local machine using the following command:
git clone https://github.com/jothi-prasath/bash-scripts.git
-
Navigate to the script's directory:
cd bash-scripts
-
Symbolic link all the scripts into your system:
sudo ./linker.sh
The linker.sh script creates symbolic links from the current folder's scripts to the /usr/local/bin directory, allowing you to execute the scripts from anywhere in the terminal by simply typing their names. This method enables easy upgrades using git pull in the future.
To use any of the scripts in this repository, follow these steps:
-
Clone the repository to your local machine using the following command:
git clone https://github.com/jothi-prasath/bash-scripts.git
-
Navigate to the script's directory:
cd bash-scripts
-
Run the script:
./script-name
-
(optional) If you want you can directly copy these scripts to your system
sudo cp -pv !(.git|.gitignore|README.md|LICENSE|*.sh) /usr/local/bin
After completing this steps, you should be able to execute the scripts from anywhere in the terminal by simply typing their names.
Please make sure to read the comments within the script file for any additional requirements or instructions specific to that script.
Some of the scripts in this repository may have dependencies on external tools or packages. Before running these scripts, make sure you have the necessary dependencies installed on your system. The specific dependencies required for each script can be found within the individual script files themselves.
In future I will try to make these scripts to auto install the required dependencies when needed.
Contributions to this repository are welcome! If you have a useful Bash script that you would like to share, feel free to open a pull request. Before submitting a pull request, make sure to:
- Provide a clear description of the script's purpose and functionality.
- Follow consistent coding conventions and style guidelines.
- Test the script thoroughly to ensure it works as expected.
- Update the README file with the necessary details about the new script. Together, we can expand the collection and make it even more useful for the community!
This repository is licensed under the MIT License. You are free to modify, distribute, and use the scripts in this repository in accordance with the terms of the license.