in reply to Re: NET:SSH2 exec syntax usage
in thread NET:SSH2 exec syntax usage
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\" ");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: NET:SSH2 exec syntax usage
by ZigZaggin (Initiate) on Apr 18, 2011 at 17:53 UTC | |
by SitrucHtims (Novice) on Apr 22, 2011 at 01:07 UTC |