Sort by custom alphabet The challenge is to make a program that sorts a list of words, only that the words need to be in the order of a random given alphabet.

Your program will accept a string of comma-separated words and a new alphabet.
Your program will output every word in the same way in the new sorted order.

Example:

Input:

home,oval,cat,egg,network,green bcdfghijklmnpqrstvwxzaeiouy


Output:

cat,green,home,network,egg,oval


This is a code-golf, so the winner is the person with the shortest program.

This is my first challenge so any improvements to the question/challenge are appreciated.
Bash+coreutils, 37 bytes

tr ,$2 \\na-z&lt;&lt;&lt;$1|sort|tr \\na-z ,$2


Output:

$ ./alphasort.sh home,oval,cat,egg,network,green bcdfghijklmnpqrstvwxyzaeiouy
cat,green,home,network,egg,oval, $