HI! I want execute the command: $cmd="tar -cvvf logswitch.tar `find *.log* -mtime +5` --remove-files"; print $ssh "$cmd\r"; only if find *.log* -mtime +5 find some files. Thanks in advance.
I would suggest you use the 'if' construct for that...CPAN::Forum
Expect - Re: execute command only if