Pass a value for an input prompt
9,078
I think you're looking for the yes
command :
yes | unzip my.zip
It sends y
to the output again and again. If you want to send something else, specify it as the argument:
yes n | unzip my.zip
You can also use echo
if there's only one question:
echo no | unzip my.zip
Related videos on Youtube
Comments
-
lukas.pukenis over 1 year
I do
unzip my.zip
and if files already exists it asksreplace myfile.ext [y]es, [n]o, [A]ll, [N]one, [r]ename:
How can I force input for when the command prompts for input? I am aware
unzip
may have force flag but I am interested in passing an input.