I'm trying to download a dynamically created file (apparently redirected) when visiting a URL, however, I'm having difficulty accomplishing this objective using curl.

The url is in the following format:
http://www.domain.com/datafeeds/gene...asp?Pid=000000 (This page opens up a save dialog box with a file name of file.csv. Notice the file name is different than the ending of the url.)

The curl command used is as follows:
/usr/bin/curl -L http://www.domain.com/datafeeds/gene...asp?Pid=000000 -o /home/file.csv> /dev/null

Thanks in advance for suggestions.