pexpect ssh login and ls | grep

Dikkie Dik dikkie at nospam.org
Tue Jan 1 17:48:44 CET 2008


> shell_cmd = 'ls -l | grep mytest.log'
> child = pexpect.spawn ('ssh my at mycomp2')


I think you can give the ssh command an option to execute a file 
remotely. That way, one command would be enough.



More information about the Python-list mailing list