#!/bin/shset -efor sd in solutions*; do cd $sd for fl in *.scala; do echo "$fl compiled to ${fl%".scala"}.jar" scalac -d ${fl%".scala"}.jar $fl echo "copied to ../templates${sd#"solutions"}/" cp ${fl%".scala"}.jar ../templates${sd#"solutions"}/ done cd ..done