Skip to content

Instantly share code, notes, and snippets.

@jeandrek
Created May 13, 2026 05:26
Show Gist options
  • Select an option

  • Save jeandrek/098dd1f1f30ff527f8b135782966f59d to your computer and use it in GitHub Desktop.

Select an option

Save jeandrek/098dd1f1f30ff527f8b135782966f59d to your computer and use it in GitHub Desktop.
For piping program output
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
int c;
for (;;) {
c = getchar();
if (c == -1) return 0;
if (c == '\n')
printf("\033[1;3%dm", rand() % 8);
putchar(c);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment