yes yes yes yes

This commit is contained in:
Malin Freeborn 2023-09-14 18:59:50 +02:00
parent fac575fc59
commit aa34b8b6e8
Signed by: andonome
GPG Key ID: 52295D2377F4D70F

24
basics/yes.md Normal file
View File

@ -0,0 +1,24 @@
---
title: "yes"
tags: [ "basics" ]
---
# The Best Linux Program: `yes`
The program `yes` prints the word `yes` to your terminal until you cancel it, perhaps with 'Control + c'.
Or technically it prints `yes\n`, meaning `yes` and then a new line (like pressing the Return key).
This is extremely powerful.
If you ever want to automatically install something which persistently nags you with `do you want to do the thing? [y/N]?`, then you can just pipe `yes` into that program, and it will answer 'yes' to all questions.
```bash
yes | $INSTALL_SCRIPT_FILE.sh
```
This works best for disposable systems, like VMs or containers.
Try this on a live system, and you might find out that you should have read that message fully.
```bash
yes | yay
```