This is just a grab-bag of a bunch of scripts of I wrote over time for various purposes. In some cases, the term "useful" is probably an exaggeration.
These programs are free software: you can redistribute them and/or modify them under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
These programs are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with these programs. If not, see https://www.gnu.org/licenses/.
-
functions.bash
A set of bash functions for various things. Notable ones include
-
bldpath: adds a directory to a path-type variable (PATH, MANPATH, LD_LIBRARY_PATH, etc.) only if that directory is not already present.Various functions build on
bldpathto provide useful operations for common path variables. -
every: executes a command every X seconds -
with: execute a command in a different directory, restore current directory after -
which: extends the which command to find and print functions, aliases -
sum_size: print just the sum of the sizes of the files given -
comp: do completion expansion for a command, as though hittingtabon the command line -- useful for scripts
-
-
file_dupes.py
Searches a file directory tree for files that are duplicates (contents are identical). Checks file sizes first, if it finds two or more files with the same size it runs
md5sumto get a checksum and checks whether the results are identical. -
dopercent.bash
dopercent.bash NN command...Randomly executes a command, with probability NN percent. Useful for spot checks, simulations, etc.
-
report_class_hier.py
Handy script to scan one or more Python source files and report classes that are defined in them, with the parent-child relationships displayed with indenting.