I have a script called setup.sh:. install.sh && . tolinux.sh && . startn.sh && . startm.shThis is install.sh:yes | sudo apt-get updateyes | sudo apt-get install default-jdkyes | sudo apt-get install expectsudo apt-get install lftpcd /usr/local/src/wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gztar xf noip-duc-linux.tar.gzcd noip-2.1.9-1//usr/bin/expect <<END_SCRIPTspawn make installexpect Please enter the login/email* { send Username\r }expect Please enter the password for user* { send password\r }expect Please enter an update interval* { send 30\r }expect Do you wish to run something at successful update* {send N\r }END_SCRIPTThis is how I run the whole thing in the terminal:. setup.shThe yes command causes problem somewhere within the first two lines. I know both of those installs ask for confirmation. What happens is output similar to this:yyyyyyyyyyyyyyyySelecting previously unselected package libdatrie1:amd64.Preparing to unpack .../libdatrie1_0.2.8-1_amd64.deb ...Unpacking libdatrie1:amd64(0.2.8-1) ...[several similar lines]Selecting previously unselected package libpango-1.0-0:amd64.Preparing to unpack .../libpango-1.0-0_1.36.3-1ubuntu1_amd64.deb ...Unpacking libpango-1.0-0:amd64 (1.36.3-1ubuntu1) ..._(last underscore is where cursor keeps blinking)I'm guessing that yes command has somehow interrupted the install, but I don't understand why or how...Any ideas?
Deadlock with yes command
apt;expect
from man apt-get   -y, --yes, --assume-yes       Automatic yes to prompts; assume yes as answer to all prompts and run non-interactively. If an       undesirable situation, such as changing a held package, trying to install a unauthenticated package or       removing an essential package occurs then apt-get will abort. Configuration Item: APT::Get::Assume-Yes.have you tried ?editmy proposal for install.sh sudo apt-get -y update sudo apt-get -y install default-jdk sudo apt-get -y install expect sudo apt-get install lftp # rest unchanged