Welcome to the shell scripts repository, a collection of powerful and easy-to-use scripts designed to automate various tasks and make a developer's life easier! Whether you're looking to streamline your workflow, manage your environment, or perform repetitive tasks effortlessly, shell scripts has got you covered.
- Ease of Use: Simple and intuitive scripts with clear instructions.
- Productivity Boost: Automate repetitive tasks to save time and reduce errors.
- Versatile: Suitable for various development environments and use cases.
- Open Source: Contribute, customize, and enhance the scripts to fit your needs.
- Bash: Most of the scripts are Bash scripts, so you will need to have a Bash interpreter installed on your local.
- Permissions: Ensure you have the necessary permissions to execute shell scripts. Or, you could run a
chmodcommand to update permissions.
- Clone the Repository:
$ git clone https://github.com/durutheguru/shell_scripts.git - Next cd into the shell_scripts directory on your terminal and then run
make. This should install theinstall_script.shfile that allows you to install other shell scripts. - You might want to look at the
install_script.shfile found in the misc folder. The script installs other shell scripts by copying them to the/usr/local/binfolder and adding an alias to the bash_profile with the script name.file=$1 chmod +rwx $file cp $file /usr/local/bin file_name=${file%%.*} if grep -q "$file" "$bash_profile_path"; then echo "Updated Installation..." else echo "alias $file_name='bash /usr/local/bin/$file'" >> ~/.bash_profile echo "Installation successful..." fi - To install a script, simply invoke:
$ install_script <<script file name>> - The
install_scriptautomatically refreshes the terminal, but in some cases, you may need to do a manual reload. - After successful installation, you should be able to invoke the script from your terminal by the file name.
Here's an example that installs find_file.sh located in the misc folder. find_file is a shell script that searches a directory for a file name.
$ install_script find_file.sh
$ find_file <<directory>> <<file_name>> ## can be called from any path, context or terminal on the local machine
Read the CONTRIBUTING.md file
Feel free to raise issues if you find bugs in the script. I'll do my best to address them. You can also reach me here: durutheguru@gmail.com