Miscellanious utility scripts.
find-fileSimple to use tool to find a file or folder anywhere in the current directory, while allowing you to ignore directories.
Simply save the script in any folder and run:
bash find-file file1 file2 -i dir1 dir2
For example, if I want to find all README* files, except from my repositories:
bash find-file README* -i NikoboiNFTB
Much easier than running;
find . \( -name "README.md" -o -name "README.txt" -o -name "README" \) | grep -Ev "NikoboiNFTB"
sortSort any file alphabetically.
Save the script and run it anywhere:
bash sort <file>
This is a general use version of the sort file from NikoboiNFTB/DeSlop/block/sort
You can install any one of the scripts into any folder by running:
wget https://shell.nikoboi.dev/utils/*
Fill in the path to the script. shell.nikoboi.dev resolves to this repository.
Place any script in /usr/local/bin/ for easy access anywhere:
sudo mv script /usr/local/bin/script
This will allow you to easily run the script as any other Linux command:
script
Very much recommended for scripts you use a lot in many different folders.
Make sure you don’t overwrite anything in /usr/local/bin/ or that the filename isn’t a command:
cat /usr/local/bin/script-name
script-name