How to surpass the Y/N command in google collab shell command?
Question:
so I have command which ask the Found 1 job(s). Submit? [y/N]:
in google collab but how can I enter Y or N in collab shell command automatically
Answers:
What command are you running?
yes
command maybe the one you may looking for. I don’t know what your command is but here is example:
yes | apt-get update
.
You can also run yes --help
to see more option
A similar question can be found here How do I automatically answer y in bash script?. The bash script in the question is just commands only, so you can take it as example.
so I have command which ask the Found 1 job(s). Submit? [y/N]:
in google collab but how can I enter Y or N in collab shell command automatically
What command are you running?
yes
command maybe the one you may looking for. I don’t know what your command is but here is example:
yes | apt-get update
.
You can also run yes --help
to see more option
A similar question can be found here How do I automatically answer y in bash script?. The bash script in the question is just commands only, so you can take it as example.