#!/usr/bin/perl use Expect; $Expect::Log_Stdout=0; my $exp = Expect->spawn(); $exp->log_file("/ossd/tc1364/top.log"); $exp->send("/usr/local/bin/top\r"); $exp->expect(10,'CPU states') or exit(1); sleep(1); $exp->soft_close(); exit(0);
In reply to Expect & top by tc1364
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |