VFX/Bash-Scripts
1
0
Fork
You've already forked Bash-Scripts
0
A collection of basic utilities designed to run in a terminal.
  • Shell 100%
2026年05月19日 13:56:17 -04:00
coin Adds scripts. 2025年03月09日 22:21:57 -04:00
colors Removes trailing newline. 2025年09月18日 14:00:32 -04:00
crypto Adds scripts. 2025年03月09日 22:21:57 -04:00
example Adds scripts. 2025年03月09日 22:21:57 -04:00
filter Adds script. 2025年09月15日 10:29:15 -04:00
LICENSE Initial commit 2025年03月10日 02:17:07 +00:00
README.md Fixes append logic. 2025年09月18日 16:57:48 -04:00
rn Adds scripts. 2025年03月09日 22:21:57 -04:00
search Simplifies regex logic. 2025年05月10日 11:40:56 -04:00
stats Adds better output formatting and audio device levels. 2026年05月19日 13:56:17 -04:00
substitute Adds script. 2026年01月12日 12:34:36 -05:00
url Adds scripts. 2025年03月09日 22:21:57 -04:00
venv Adds scripts. 2025年03月09日 22:21:57 -04:00
weather Adds scripts. 2025年03月09日 22:21:57 -04:00

Overview

These scripts are written in Bash, but involve tools such as cURL and GNU Core Utilities, which should be a low enough dependency footprint to work on both MacOS and Linux systems. Each script's purpose is commented directly in the source code.

How to use

Most of these scripts support an optional input argument. They can be acquired and invoked in a few different ways that will be outlined below. Note that any instance of <script> refers to the name of the script, which is meant to be replaced at runtime.

Download altogether

With git:

git clone https://codeberg.org/VFX/Bash-Scripts.git

Without git:

curl -Os https://codeberg.org/VFX/Bash-Scripts/archive/main.zip
unzip -q ${_##*/} && rm $_

Download individually

curl -Os https://codeberg.org/VFX/Bash-Scripts/raw/branch/main/<script>

Run in place

bash <script> <argument>

Integrated execution

There are a few options to invoke as a command without needing to enter or specify the path.

Add to $PATH

The files are not created with executable permissions. To make them executable, run chmod +x <script>

Then, add the script to $PATH by placing it in one of the directories listed from running echo $PATH, which can be performed graphically or by running mv <script> <directory>

They can also be added to .bashrc as functions for the same effect.

Add to .bashrc individually

These scripts are simple enough to be stored as functions, which could be used to consolidate them into a single file. To do this, follow this syntax while excluding the shebang (#!/usr/bin/env bash)

<script>() {
	<place all code here>
}

Add to .bashrc altogether

Running the following code will append all code in this repository as functions to ~/.bashrc.

curl -Os https://codeberg.org/VFX/Bash-Scripts/archive/main.zip
unzip -q ${_##*/} && rm $_
cp ~/.bashrc{,.bak}
for file in bash-scripts/*; do
	if [[ $(< "${file}") =~ ^'#!/usr/bin/env bash' ]]
		then mapfile -s 2 script < "${file}"
		printf '%b' "\n${file##*/}() {\n${script[@]}\n}\n" >> ~/.bashrc
	fi
done
rm -r bash-scripts

Remote execution

Warning: this method is not considered a safe practice, but is included for educational purposes.

curl -s https://codeberg.org/VFX/Bash-Scripts/raw/branch/main/<script> | bash -s <argument>