Tagged: scripting

0

Returning a value from a node child process

One can execute Linux, git shell commands from node script using node’s child process API like exec, execSync. But when you want to save the return value outside of the function scope, one must...

0

[: !=: unary operator expected

In bash, always use the double bracket conditional command [[ … ]] For example, #!/bin/bash sex=male if [[ $sex == ‘male’ ]];then echo “sex is male.” elif [[ $sex == ‘female’ ]];then echo “sex...