pexpect ssh login and ls | grep

Dikkie Dik dikkie at nospam.org
Tue Jan 1 11:48:44 EST 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