my $cmd = '/usr/bin/ksh -c \' LOGDIR=/log/predecode LOGFILE=$LOGDIR/usage`date \'+%m\'` if [ -w $LOGFILE ] ; then echo "$LOGNAME; `date \"+%D %T\"`;`uname -a`;${DISPLAY:-SSH:$SSH_CONNECTION}" >>$LOGFILE fi while read LINE do if [ "$LINE" == "" ] then continue; fi PRE="${LINE%%\|*}" POST="${LINE#[0-9]*\|}" if [ "${POST%%[A-Z]*}" == "_" ] then print "$PRE|$POST" continue; fi ( print -n "$PRE|"; echo $POST | ' . /usr/bin/farendcommand . ' print "\n" ) done\''; my ($stdout, $stderr, $exit) = $ssh->cmd($cmd, $inputForFarEnd);