How to send data to command line after calling .sh file? -
i want install anaconda through easybuild. easybuild software manage software installation on clusters. anaconda can installed sh anaconda.sh
. however, after running have accept license agreement , give installation location on command line entering <enter>
, yes <enter>
, path/where/to/install/ <enter>
.
because has installed automatically want accepting of terms , giving install location in 1 line. tried this:
sh anaconda.sh < <(echo) >/dev/null < <(echo yes) >/dev/null \ < <(echo /apps/software/anaconda/1.8.0-linux-x86_64/) > test.txt
from test.txt can read first echo works <enter>
, can't figure out how accept license agreement, sees not sending yes:
do approve license terms? [yes|no] [no] >>> license agreement wasn't approved, aborting installation.
how can send yes correctly script input?
edit: sorry, missed part having enter more 1 thing. can take @ writing expect scripts. thegeekstuff.com/2010/10/expect-examples. may need install however.
you try piping following command: yes yes | sh anaconda.sh
. read man pages more information man yes
.
Comments
Post a Comment