I have installed Ubuntu on a VMWare virtual machine. When I got to installing a VMWare tools, I have stumbled upon a simple question:If I execute a script (perl script in VMWare tools case), is there a way for me to tell the execution beforehand, that if it prompts me for an input, given that it has a default value, it just uses it, not waiting for me to press Enter?
Unatended script execution in ubuntu terminal
shell script;utilities
yes is designed for this purpose; it outputs the same string to stdout continuously, so you can pipe it into another script and it will keep answering the same for every prompt. It defaults to y so it can say yes to the prompts, but if you just want it to send a newline each time you can pass it the empty string as an argument:$ yes '' | vmware-script