First the user must had the right that it can open this script and rights that it can snap to directory
Another problem is if the script is written under windows and is only copy to Solaris, there are a lot of problems with the next line.
Then you must copy this script and generate to solaris
under fromdos test.sql
So you have a script which goes under solaris.