No too sure of this is the way to do it but I think that MAC OS is UNIX based, and if so this is out of Maya 6 the complete ref.
save it as a .txt file then you change the permissions so out of the book
"open a shell then use the cd command to navigate to the location then type the following
chmod a=rwx filename.txt
(where filename is the name of the text file)
press enter (return) then to begin rendering type
./filename.txt
As I say I dont know if this is the correct way to do it for a mac but it might make more sense to a mac user as some of the commands might be commonplace in your OS vocab, and hence make sense.
"No pressure, no diamonds" Thomas Carlyle