Illuminatus is correct. If you want to use single quotes, you will have to concatenate your variables. Otherwise you can switch them to double quotes and backslash your literal double-quotes.
ex. $chan->exec('zcat /db2home/idsldap/idsslapd-idsldap/logs/ibmslapd.log.' . $ibmslapd_fn . '-2350.gz | grep -i "entries have been successfully" ');
or
ex. $chan->exec("zcat /db2home/idsldap/idsslapd-idsldap/logs/ibmslapd.log.$ibmslapd_fn-2350.gz | grep -i \"entries have been successfully\" ");
In reply to Re^2: NET:SSH2 exec syntax usage
by SitrucHtims
in thread NET:SSH2 exec syntax usage
by ZigZaggin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |