The following is a simple bash script to search a directory heirarchy for CoffeeScript files, concatenate them and compile them into a single javascript file.
First recursively print the paths to all CoffeeScript files:
find -L . -name "*.coffee"
Then print their contents:
find -L . -name "*.coffee" -exec cat {} \;
Then pipe the concatenated coffeescript into the CoffeeScript compiler. The output will be sent to stdout:
find -L . -name "*.coffee" -exec cat {} \; | coffee -sc
Finally, redirect stdout to a file:
find -L . -name "*.coffee" -exec cat {} \; | coffee -sc > compiled.js