After-job routine calls unix command 'sed'
Moderators: chulett, rschirm, roy
After-job routine calls unix command 'sed'
Does anyone know why after-job routine ExecSH does not work on unix command like --> sed "s/a/b/g" <input.txt >output.txt ??
This command works fine if I run it on the command line.
Thanks.
This command works fine if I run it on the command line.
Thanks.
Your 'example' shows a relative path, hence the guess. First you mentioned ExecSH and now DSExecute. Please post the exact syntax you are using to execute whatever command you are running.
DSExecute returns information in the two variables you name at the end of the call - check the docs. For what you posted, 'output' would be the name of a variable that captured anything echoed to standard out by the script/command and 'msg' would be a variable that captures the exit code from the script/command.
And what is ".." for the UNIX command to actually execute supposed to mean?![Confused :?](./images/smilies/icon_confused.gif)
![Idea :idea:](./images/smilies/icon_idea.gif)
And what is ".." for the UNIX command to actually execute supposed to mean?
![Confused :?](./images/smilies/icon_confused.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Sorry for not clearly explained my situation.
If you look at the built-in source code for routine ExecSH, it actually calls the DSExecute() function to execute the unix command. the output and msg (or should I say returncode) can be used for capturing what is going on. These two arguments returned nothing in my case.
I guess what I try to ask is if anyone has used the sed command successfully. for instance, I had experience that ExecSH complained the command $(date) but not `date`
Thank you very much for your reply!
If you look at the built-in source code for routine ExecSH, it actually calls the DSExecute() function to execute the unix command. the output and msg (or should I say returncode) can be used for capturing what is going on. These two arguments returned nothing in my case.
I guess what I try to ask is if anyone has used the sed command successfully. for instance, I had experience that ExecSH complained the command $(date) but not `date`
Thank you very much for your reply!
Here is the exact input value for Afater-Job Routine ExecSH I used:
sed "s/a/b/g" < #FilePath#/input.txt > #FilePath#/output.txt
where #FilePath# is /dir1/dir2/dir3
I can see in the job log that the #FilePath# is expanded correctly, but there is nethier error messages nor output.txt file being generated.
Thanks,
sed "s/a/b/g" < #FilePath#/input.txt > #FilePath#/output.txt
where #FilePath# is /dir1/dir2/dir3
I can see in the job log that the #FilePath# is expanded correctly, but there is nethier error messages nor output.txt file being generated.
Thanks,