2014-06-11 16:20:12 -07:00
|
|
|
# yes
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
> Output something repeatedly.
|
2020-10-15 09:37:04 -04:00
|
|
|
> This command is commonly used to answer yes to every prompt by install commands (such as apt-get).
|
2025-01-18 18:45:33 +05:30
|
|
|
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/yes-invocation.html>.
|
2014-06-11 16:20:12 -07:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Repeatedly output "message":
|
2014-06-11 16:20:12 -07:00
|
|
|
|
|
|
|
`yes {{message}}`
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Repeatedly output "y":
|
2014-06-11 16:20:12 -07:00
|
|
|
|
|
|
|
`yes`
|
2020-10-15 09:37:04 -04:00
|
|
|
|
|
|
|
- Accept everything prompted by the `apt-get` command:
|
|
|
|
|
|
|
|
`yes | sudo apt-get install {{program}}`
|
2024-02-12 11:23:37 +02:00
|
|
|
|
|
|
|
- Repeatedly output a newline to always accept the default option of a prompt:
|
|
|
|
|
|
|
|
`yes ''`
|