Add a Postcommand in FDL (FlowTracer)

A pre-command or post-command (specified with properties PRECMD and POSTCMD respectively) can be specified in FDL as follows:


T echo hello > log
P POSTCMD {sh -c "echo post && exit 66" }
O -sticky log

‚Äč

The shell actual command is called sh -c, because the entire POSTCMD is run inside the system command from c, which does not offer any shell functionality like the echo command. More complex scripts should be specified in an executable file.

 

Did you find this article helpful?