User Controls

Post this into your terminal

  1. #1
    Lanny Bird of Courage
    #!/bin/bash
    #Background Colors
    E=$(tput sgr0); R=$(tput setab 1); G=$(tput setab 2); Y=$(tput setab 3);
    B=$(tput setab 4); M=$(tput setab 5); C=$(tput setab 6); W=$(tput setab 7);
    function e() { echo -e "$E"; }
    function x() { echo -n "$E "; }
    function r() { echo -n "$R "; }
    function g() { echo -n "$G "; }
    function y() { echo -n "$Y "; }
    function b() { echo -n "$B "; }
    function m() { echo -n "$M "; }
    function c() { echo -n "$C "; }
    function w() { echo -n "$W "; }

    #putpixels
    function u() {
    h="$*";o=${h:0:1};v=${h:1};
    for i in `seq $v`
    do
    $o;
    done
    }

    img="\
    x40 e1 x40 e1 x40 e1 x40 e1 x5 b7 x5 b1 x2 b2 x18 e1 x4 b2 x11 b1 x2 b1 x7 b2 x10 e1 x4 b1 x12 b1 x1 b2 x8 b1 x10 e1 x4 b1 x12 b1 x1 b1 x9 b1 x10 e1 x4 b2 x11 b3 x10 b1 x9 e1 x5 b1 x3 r2 x7 b2 x4 r2 x4 b1 x9 e1 x5 b1 x3 r1 x8 b3 x3 r2 x4 b1 x9 e1 x5 b2 x10 b1 x2 b2 x8 b1 x9 e1 x6 b3 x8 b1 x3 b1 x8 b1 x9 e1 x8 b3 x5 b2 x3 b2 x6 b2 x9 e1 x10 b7 x5 b2 x5 b1 x10 e1 x23 b7 x10 e1 x40 e1 x40 e1 x40 e1 x40 e1 x40 e1 x40 e1 x40"

    for n in $img
    do
    u $n
    done
    e;
    exit 0;
  2. #2
    NARCassist gollums fat coach
    no




    .
  3. #3
    Lanny Bird of Courage
    your loss homie
  4. #4
    NARCassist gollums fat coach
    what does the echo function do in bash anyway?




    .
  5. #5
    Lanny Bird of Courage
    It just writes its argv to stdout. So like `echo foo` just prints foo. Also a newline at the end. Depending on which version comes with your OS (or if it's a shell builtin which is sometimes the case) it has some params to control input/output but that's the canonical form. In this case it's being used to spit out escape codes to indicate the background color or a character cell to be shaded.
  6. #6
    NARCassist gollums fat coach
    so that would switch all the color on my screen?




    .
  7. #7
    Lanny Bird of Courage
    no, it draws out a picture by filling your screen with whitespace with different background colors
  8. #8
    NARCassist gollums fat coach
    its not permanent then?




    .
  9. #9
    NARCassist gollums fat coach
    what is it, a dick pic?




    .
  10. #10
    Lanny Bird of Courage
    nah, sub-MS-paint tier drawing of boobs
  11. #11
    Malice Naturally Camouflaged
    What's a terminal? Is it that black window thing in that bootleg Windows OS for poor people and hackers they call Linus?
  12. #12
    Sophie Pedophile Tech Support
    Originally posted by Malice What's a terminal? Is it that black window thing in that bootleg Windows OS for poor people and hackers they call Linus?

    Yes. Although this won't run in your Windows shell(Terminal).
  13. #13
    -SpectraL coward [the spuriously bluish-lilac bushman]
    Written by Max Irwin.
Jump to Top