Below is my script where i need to pass the password as parameter
#!/usr/bin/expect -f
set password [lindex $argv 0];
spawn iroot
expect ".* password for"
sleep 3
send "$password\r"
sleep 5
send "dmidecode -t system | grep Manufacturer > /tmp/manufacdetails.txt\r"
send "exit\r"
interact
i tried executing this like below
./getmanufacdetailsTest.sh password123
But it doesn't seems to be working. can you please tell me what i am doing wrong here