Re: [Soaplab-users] shell builtin
Brought to you by:
marsenger
From: Martin S. <mar...@gm...> - 2008-04-11 12:58:19
|
> Is there a way to use shell builtin (like type) as executable in > application ? Not a straightforward way. Java does not support it (as far as I know) so you have to write a wrapper script around your builtin. The second option is to use application attribute 'method' in your ACD file. For example, let's assume that you wish to execute builtin 'let' (that returns an exit code depending on the evaluation of its parameters): appl: HelloWorld [ ... executable: "bash" comment: 'method -c "let ${greeting}"' ] This works fine - try for example the command-lines (and see that the exit code changes): build/run/run-cmdline-client -name classic.helloworld -w -r -protocol local greeting '1+1' build/run/run-cmdline-client -name classic.helloworld -w -r -protocol local greeting '1-1' But this might be a security risk - a user can send anything and it is evaluated by your bash. I recommend to use it with caution and only when limited access is established. Cheers, Martin -- Martin Senger email: mar...@gm...,m.s...@cg... skype: martinsenger |