yes-cli 0.1.0

Sends string repeatedly to stdout
yes-cli-0.1.0 is not a library.

yes - Generates repetitive output

Unlicense Crates.io MSRV 1.56 Safe Rust Dependency status Lines of code Downloads

Overview

A Rust reimplementation of Unix Version 7 yes program.

  • Program yes sends infinite, repetitive string output to stdout.
  • The default output is 'y' for the yes variant and 'n' for the no variant.
  • A user can supply own string to repeat.
  • Newline is added. CRLF on Windows, LF on other systems.
  • -n switch suppresses appending LF.
  • For performace reasons the string is first repeated into an 8K buffer, and then the buffer is sent to stdout.

Invocation

Following command line options are supported:

  • -? Display help message.
  • -n Suppress adding a \n to each output line
  • positional arguments - User specified string to repeat. Because getopt2 parser is used you can use -- separator for separating arguments from options. This allows use of "-?" and "-n" as strings to print.
  • If you use more than one positional argument, they all will be merged together using space as separator.

MSRV

The minimal supported Rust version 1.56. The entire 2021 Rust edition is supported.

No copyright

This is free and unencumbered software released into the public domain.

You may use, modify, distribute, and contribute to this code without restriction. To the extent possible under law, the author(s) of this work waive all copyright and related rights.

Licensed under CC0-1.0 OR Unlicense.

Unlicense logo