Skip to content

Instantly share code, notes, and snippets.

@zmarvel
zmarvel / gist:7d7ca19d0142bc9ed7bc
Created February 24, 2015 23:57
Find all java classes from the current directory and execute them
#!/bin/bash
DIR=$( pwd )
CLASSES=$( find -name '*.class' -print )
for file in $CLASSES; do
filedir=$( dirname $file )
filename=$( basename $file | sed s/.class// )
echo Changing to $filedir
cd $filedir
echo Executing $filename