A python implementation to execute apex anonymously using command line.
Install Required libraries:
(sudo) pip install pyyaml xmltodict suds
Usage:
python apex_executor.py -u salesforce_user -p salesforce_password -t salesforce_token -s filename_containing_apex_code
or concatenate password and token:
python apex_executor.py -u salesforce_user -p salesforce_password+salesforce_token -s filename_containing_apex_code