Thursday, July 24, 2008

SedTris - a Tetris game written in sed.

I've seen irc clients written in sed and I've seen a lot of sed magic in my time, but this is just ridiculous...

A Tetris game written in sed.

http://uuner.doslash.org/forfun/sedtris.sed

7 comments:

  1. Not as ridiculous as GPL cola (OpenCola).

    ReplyDelete
  2. Anonymous2:58 PM

    and how do you play this thing?


    $ sed sedtris.sed
    sed: -e expression #1, char 11: unterminated `s' command

    ReplyDelete
  3. Works fine for me :-). You're doing it wrong.

    % chmod + x sedtris.sed
    % ./sedtris.sed
    Enter
    Enter..
    And see the instructions on screen :-)

    ReplyDelete
  4. You can try to use this shell script to stop pressing Enter and enjoy the game.

    ReplyDelete
  5. :[

    $ ./sedtris.sh
    sed: command garbled: s/[^~]*~$/&&&/

    what could be the problem....

    ReplyDelete
  6. That's a GNU sed script, it will not work with AIX sed or Solaris sed (UNIX sed), it needs gsed.
    On AIX for example:

    ./sedtris.sed
    sed: 0602-404 Function s/[^~]*~$/&&&/ cannot be parsed.

    Replaced the first line with:
    #!/opt/freeware/bin/sed -nf
    (this is GNU sed)

    And it works.

    ReplyDelete