$ip = ...; $fileSize = getFileSize("/opt/habridge/data/habridge.config"); if($fileSize > 0) { `jq /opt/habridge/data/habridge.config... "$ip"... | sponge /opt/habridge/data/habridge.config`; }