How to execution external shell script?

Hi,

I’m using zeek 7.0.3.

I want to call an external shell script “hello.sh” from a Zeek script and receive its return value “hello world” for next step.

The “system” function returns integer type, so I tried various tests using “exec” function, but it doesn’t seem to work well.

Could you please show me a simple Zeek script that receives string return value from an external shell script?"

Hi,

may I ask what the problem using the exec function was? In principle, that is the supported way to do this - using it should give you the stdout/stderr of the executed command in the Exec::Result record.