Modified to use on Linux.