Copy Code code as follows:
#!/bin/bash
#!/usr/bin/expect-f
#!/usr/bin/env Bash
Yum Install-y expect wget
Cd/root
wget http://172.16.92.99/share/tar/vtune_amplifier_xe_2013_update15.tar.gz
wget http://172.16.92.99/share/tar/EVAL_L_VT__VGXB-RDCJPN8X.lic
TAR-ZXVF vtune_amplifier_xe_2013_update15.tar.gz
Expect-c "Spawn sh/root/vtune_amplifier_xe_2013_update15/install.sh;
Set timeout 5; Expect "*enter*"; Send \ "\r\n\";
Expect "*enter*"; Send \ "\r\n\";
Expect "*enter*"; Send \ "\r\n\";
While {1} {
Expect {
"*--more--*" {send \ "\r\n\"}
' *accept* ' {break}
}
}
Expect "*accept*"
Send "accept\\r"
Expect "*selection*"; send "3\\r";
Expect "*choice*"; Send "2\\r";
Send "/root/eval_l_vt__vgxb-rdcjpn8x.lic"
Expect "*enter*"; Send \ "\r\n\";
Expect "*selection:*"; Send "1\\r";
Expect "*enter*"; Send \ "\r\n\";
Set timeout 25;
Expect "*enter*"; Send \ "\r\n\";
Expect "*enter*"; Send \ "\r\n\";
Expect EOF; "
rm-rf/root/*
source/opt/intel/vtune_amplifier_xe_2013/amplxe-vars.sh