Yes Save

yes - Implementation of simple and dangerous yes command in various languages. :+1:

Project README

yes

About yes

The yes command is used to output y, or whatever word you choose, forever. :repeat:

yes

Description

The yes command outputs the same string, STRING, in a constant stream. If STRING is not specified, the word it repeats is y. :repeat:

yes dates back to a time before Unix commands included the "force" (-f) option, which for many commands is the same as answering "yes" to all prompts.

yes can be used to do something very similar: if the output of yes is piped to a command, it will effectively answer "yes" to any confirmation prompts.

yes Syntax

yes [STRING]...

yes Output

y
y
y
y
y
y
.
.
.

Dangerous yes

Redirecting output to a file

yes can be dangerous also. If you redirect the output stream of yes to a file, it will eat up your storage space. :bomb:

$ yes >> yes.txt
^Z

$ du -h yes.txt
1007M yes.txt

I ran the command only for 10 Seconds. And It consumed almost 1 GB. :boom:

Nested yes

yes takes an argument and prints it infinitely. What if you take yes as argument itself. :bomb:

$ yes `yes`

You tell me what happens. :stuck_out_tongue_winking_eye:

Open Source Agenda is not affiliated with "Yes" Project. README Source: mubaris/yes
Stars
85
Open Issues
23
Last Commit
3 years ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating