Hello Jean-Yves, Terrell,
I am a bit confused with what you offered here regarding with the rule part. Could you verify what I wrote below is correct?
- Say I have "du" script in msiExecCmd_bin
#!/usr/bin/sh
echo "The total size in $1"
iquest "select sum(DATA_SIZE) where COLL_NAME like '$2%'"
- In order to call du script I need to use irule. That is;
the test.r file a client will call is:
test_rule{
msiExecCmd(*Cmd,"*Arg","null","null","null",*Result);
msiGetStdoutInExecCmdOut(*Result,*Out);
writeLine("stdout","*Out");
}
INPUT *Cmd="du", *Arg="/myZone/home/myUser"
OUTPUT ruleExecOut
the command that iCommands' user will execute:
irule -r irods_rule_engine_plugin-irods_rule_language-instance -F test.r
But how can someone use "irule" to call "du" as a command instead of calling it in a rule file? (to call the "du" script in msiExecCmd_bin and see the result in a user's stdout)
Would there be an approach like here? irule
-r irods_rule_engine_plugin-irods_rule_language-instance "msiExecCmd(...)"; "msiExecCmd(...)"; writeLine("stdout","*Out") null null
If what you meant by "The rule could be defined on the server side" is that we can put "msiExecCmd" in lets say in
core.re, then how can a user see the output by using irule invoking that rule?
Thanks,
Mustafa