/* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "no" #include #include #include #include "system.h" #include "error.h" #include "full-write.h" #include "long-options.h" #define AUTHORS proper_name ("Giuseppe Torre") void usage (int status) { if (status != EXIT_SUCCESS) emit_try_help (); else { printf (_("\ Usage: %s [STRING]...\n\ or: %s OPTION\n\ "), program_name, program_name); fputs (_("\ Repeatedly output a line with all specified STRING(s), or 'n'.\n\ \n\ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); emit_ancillary_info (PROGRAM_NAME); } exit (status); } int main (int argc, char **argv) { initialize_main (&argc, &argv); set_program_name (argv[0]); setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); atexit (close_stdout); parse_gnu_standard_options_only (argc, argv, PROGRAM_NAME, PACKAGE_NAME, Version, true, usage, AUTHORS, (char const *) NULL); char **operands = argv + optind; char **operand_lim = argv + argc; if (optind == argc) *operand_lim++ = bad_cast ("n"); /* Buffer data locally once, rather than having the large overhead of stdio buffering each item. */ size_t bufalloc = 0; bool reuse_operand_strings = true; char **operandp = operands; do { size_t operand_len = strlen (*operandp); bufalloc += operand_len + 1; if (operandp + 1 < operand_lim && *operandp + operand_len + 1 != operandp[1]) reuse_operand_strings = false; } while (++operandp < operand_lim); /* Improve performance by using a buffer size greater than BUFSIZ / 2. */ if (bufalloc <= BUFSIZ / 2) { bufalloc = BUFSIZ; reuse_operand_strings = false; } /* Fill the buffer with one copy of the output. If possible, reuse the operands strings; this wins when the buffer would be large. */ char *buf = reuse_operand_strings ? *operands : xmalloc (bufalloc); size_t bufused = 0; operandp = operands; do { size_t operand_len = strlen (*operandp); if (! reuse_operand_strings) memcpy (buf + bufused, *operandp, operand_len); bufused += operand_len; buf[bufused++] = ' '; } while (++operandp < operand_lim); buf[bufused - 1] = '\n'; /* If a larger buffer was allocated, fill it by repeating the buffer contents. */ size_t copysize = bufused; for (size_t copies = bufalloc / copysize; --copies; ) { memcpy (buf + bufused, buf, copysize); bufused += copysize; } /* Repeatedly output the buffer until there is a write error; then fail. */ while (full_write (STDOUT_FILENO, buf, bufused) == bufused) continue; error (0, errno, _("standard output")); return EXIT_FAILURE; }
STATEMENT [The “No” core-(f)utility]
This is an unofficial GNU coreutils pack that contains the core(f)utility "no"
PROGRAM NAME: "No"
REPEAT
print "n" + carriage return;
UNTIL the program is terminated
END
The above program "No" prints an endless sequence of "n" - one per line - until the user terminates the program. Then, it is recalled in the computer's shell by typing "no" and pressing "Enter".
The "no" core(f)util outputs repeatedly your wish for refusal and presents to you its absurdity and (f)utility.
....the official set of GNU core utilities includes a "yes" command. But not a "no". Thus, the oreutils "no" fills this gap. (You are welcome!)... well, this is not the whole story. To get the full picture, install this (f)utility and read the manifesto on the "man no" page
A video and a story HERE
README - (HOW TO INSTALL)
To install this unofficial version of the GNU core utilities that include the “No” core (f)utility do:
- Download the zip HERE <
- Open your terminal/shell
cd [to the folder containing the core(f)utilities zip files (likely in your download folder)]
Done
tar -xvf [name of the unzipped folder]
cd [into the unzipped folder]
.configure
make
sudo make install
in Terminal/Shell you can now type the following [Commands]:
no -> \- output repeatedly your wish for refusal and presents to you its absurdity
man no --> displays the text submitted to the Transmediale's Almanac 2021 (for Refusal)
---------------------------
Read the article for the Transmedial Almanac at:
https://202122.transmediale.de/almanac/the-no-core-futility-and-the-impossible-refusal