Executing shell script with xp_cmdshell

...just installed xp_server in our Sun machine to execute some shell scripts with xp_cmdshell. We probed this procedure with simple commands (ls, ps, etc) and there are not any problems. But the problems began when we probe our shell script. The execution finishes before the end of the script. Always in the same point, one of the programs
called with this script which it is quite heavy (it can last some minutes to finished). There is no problem with the script when we run it from the SO prompt.

Does xp_cmdshell cut the connection with the SO it there is no a response for a while? Is there any problem with shell scripts?

Regards.

I became crazy looking for any interaction problem between xp_server and our program.:mad: :mad: :mad:

Well... to be honest, I've never worked with xp_cmdshell
on Sun but could this be related to the following bug...

http://support.microsoft.com/support/kb/articles/Q255/7/49.ASP

Microsoft SQL Server versions 6.5, 7.0

--------------------------------------------------------------------------------
BUG #: 18996 (SQLBUG_65)
BUG #: 57628 (SQLBUG_70)

SYMPTOMS
The last line of a command's output is not returned by the built-in extended stored procedure xp_cmdshell if that line does not end in a carriage return/line feed (CR/LF).

WORKAROUND
To work around this problem, add a CR/LF to the end of the data sent to stdout by the executed command.

...that is what i wanted...it worked like magic....thanx....
I appreciate already....

Regards
Gerald.