Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mubaris/yes

yes - Implementation of simple and dangerous yes command in various languages. :+1:
https://github.com/mubaris/yes

command-line linux multiple-languages terminal yes

Last synced: about 4 hours ago
JSON representation

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

Awesome Lists containing this project

README

        

# yes

## About yes

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

![yes](https://media.giphy.com/media/L9kwXOK00OJGM/giphy.gif)

## 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: