To run the script call:

/usr/bin/php -c /users/php.ini    /vol/srv/www/htdocs/lime/admin/cmdline_exportsurvey.php    99999    USER    PASSWORD    /users/lime/data.csv

The 2 PHP files in the archive (not the BAK file) have to be placed in the LS admin folder. The command above is called from a different server hence the file php.ini
is copied from the server that hosts LS to the server that the export scripts runs on. Please make sure that your command line PHP interpreter options are the same as your web server PHP options. 
The simplest way to do it is to use php.ini from the web server i.e. copy it over.  

- 99999 is the survey ID
- USER and PASSWORD are the same as your LS credentials.
- the output is saved in /users/lime/data.csv

The data are saved to a CSV file. You would have to edit the PHP files if you want different output type. I DID NOT TEST IT WITH OTHER DATA TYPES (only CSV)!!!

My LS version is:

$versionnumber = "1.90+";
$dbversionnumber = 143;
$buildnumber = '9343';

yours is likely different and that's why I am sending you the original LS file (exportresults.php-BAK) which I had to modify. 3 files in total then:

1. cmdline_exportsurvey.php  - the file I created based on "cmdline_importsurvey.php" file provided by LS (you most likely won't have to modify it)
2. exportresults.php-BAK - the backup of the original file that came with LS (just for the code reviewing purposes)
3. exportresults_for_cmdline.php - the custom file called by cmdline_exportsurvey.php (this is the file I made all my changes to)

If you DIFF exportresults.php-BAK and exportresults_for_cmdline.php you will see all custom changes I had to make.

Good luck!
Luke