Converting a routine from Linux to work on NT
Posted: Tue Jan 13, 2009 12:34 pm
I have a DS routine that works just great on Linux/Unix.
Trying to convert to work on an NT server.
We have installed MKS Toolkit on the the NT server.
The routine issues Unix commands and then does stuff with RT_LOG files...
The very first command is giving me fits.
The command is "find . -name "RT_LOG*"" (minus the first and last double quotes).
The asterisk I believe is messing it up, but I need the asterisk and am struggling with why the command is being messed up via the dsexecute command.
I've tried a million (ok, 10 or more) different things like escaping the spaces, or escaping the asterisk, but can't get it to work.
The command will be parsed and executed successfully without the asterisk, but I need the asterisk.
If I run the commands from the command line they work perfectly, just not via DS.
I've checked to make sure env variables are the same between my user session command lines and the DS env variables, like PATH and such.
Any ideas?
Trying to convert to work on an NT server.
We have installed MKS Toolkit on the the NT server.
The routine issues Unix commands and then does stuff with RT_LOG files...
The very first command is giving me fits.
The command is "find . -name "RT_LOG*"" (minus the first and last double quotes).
The asterisk I believe is messing it up, but I need the asterisk and am struggling with why the command is being messed up via the dsexecute command.
Code: Select all
UnixCmd = ' find . -name "RT_LOG*"'
Call DSLogWarn("UnixCmd =":UnixCmd ,'AAA')
Call DSExecute("NT", UnixCmd, ScreenOutput, SystemReturnCode)
Call DSLogWarn("ScreenOutput =":ScreenOutput,'AAA')
The output from testing the routine is:
Test completed.
DSLogWarn called from : AAA
Message to be logged is...
> UnixCmd = find . -name "RT_LOG*"
DSLogWarn called from : AAA
Message to be logged is...
> ScreenOutput =Unknown option "RT_LOG10"
> Usage: find directory ... expression
>
Result = Unknown option "RT_LOG10"
Usage: find directory ... expression
The command will be parsed and executed successfully without the asterisk, but I need the asterisk.
If I run the commands from the command line they work perfectly, just not via DS.
I've checked to make sure env variables are the same between my user session command lines and the DS env variables, like PATH and such.
Any ideas?