I'm executing following commands in a nodejs application using child processes.
path-to-zip + " -r abc.zip " + path + " && du -hs abc.zip"
It depends on your shell.
Bash is the the most common shell in Linux distribution.
Bash, there are two common ways which are called Command Substitution to achieve this.
｀which zip｀ + whatever you want (｀means`, I type ｀due to the syntax policy of StackOverflow.)
$(which zip) + whatever you want
Manual of Command Substitution :