ACIL FM
Dark
Refresh
Current DIR:
/usr/share/doc/perl-Expect/tutorial
/
usr
share
doc
perl-Expect
tutorial
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
1.A.Intro
2.37 MB
chmod
View
DL
Edit
Rename
Delete
2.A.ftp
3.01 MB
chmod
View
DL
Edit
Rename
Delete
2.B.rlogin
3.95 MB
chmod
View
DL
Edit
Rename
Delete
3.A.debugging
1.93 MB
chmod
View
DL
Edit
Rename
Delete
4.A.top
928 B
chmod
View
DL
Edit
Rename
Delete
5.A.top
1.11 MB
chmod
View
DL
Edit
Rename
Delete
5.B.top
2.39 MB
chmod
View
DL
Edit
Rename
Delete
6.A.smtp-verify
3.18 MB
chmod
View
DL
Edit
Rename
Delete
6.B.modem-init
1.79 MB
chmod
View
DL
Edit
Rename
Delete
README
644 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /usr/share/doc/perl-Expect/tutorial/4.A.top
#!/usr/bin/perl # This example is a replay of sorts of the rlogin example #before except in this example we turn control of the process back #to the user through use of interact(). use Expect; # $Expect::Debug=2; $Expect::Exp_Internal=1; $RSH='/usr/local/bin/ssh'; $host_to_login_to=shift(@ARGV); # Get the password. We will show how to do this without printing the # password to the screen later. print "Enter password: "; $password=<STDIN>; chomp $password; $rsh=Expect->spawn($RSH,$host_to_login_to); # Look for a password prompt. $rsh->expect(30,'-re','word:\s$')||(die"Never got password prompt\n"); print $rsh "$password\r"; # Look for a prompt. Prompt can be # $ > or ] followed by a whitespace. $prompt = '[\]\$\>\#]\s$'; # Note the use of -re $rsh->expect(30,'-re',$prompt)||(die "Never got prompt on host\n"); # Start top print $rsh "exec top\r"; # OK, now return control to user. $rsh->interact();
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply