Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cat download a picture of a cat. #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

heitorPB
Copy link

Using The Cat API.
Of course that should be the function of the command cat. Who would think that cat file.txt should dump the file instead of downloading a picture of a cat?

@kcdtv
Copy link

kcdtv commented Apr 27, 2016

Meow!

alias cat=true;
# Let `cat` download a random picture of a cat, because that's what she wants
# when the user typed cat, right?
alias cat='wget -b -nv -q thecatapi.com/api/images/get?format=src 2> /dev/null && /bin/cat'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not save it as a .png file in /tmp and even open it everytime. 😜

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because some people should also run this evil.sh in headless servers, it could be impossible to open the png remotely if the server has no Xorg.

@benaryorg
Copy link
Collaborator

Unless you are running terminology and [insert name of other terminal emulator supporting this] and using tycat or decoding and writing to the framebuffer on a tty this won't always be noticed and this is particularly bad if that picture goes unseen.

Cats deserve to be seen!

Meow.

@benaryorg
Copy link
Collaborator

Also you should probably make this a function and run wget using &>/dev/null (redirects stdout and stderr), just in case.

@noamnelke
Copy link

suggestion: just echo this:

                  T."-._..---.._,-"/|
                  l|"-.  _.v._   (" |
                  [l /.'_ \; _~"-.`-t
                  Y " _(o} _{o)._ ^.|
                  j  T  ,-<v>-.  T  ]
                  \  l ( /-^-\ ) !  !
                   \. \.  "~"  ./  /c-..,__
                     ^r- .._ .- .-"  `- .  ~"--.
                      > \.                      \
                      ]   ^.                     \
                      3  .  ">            .       Y
         ,.__.--._   _j   \ ~   .         ;       |
        (    ~"-._~"^._\   ^.    ^._      I     . l
         "-._ ___ ~"-,_7    .Z-._   7"   Y      ;  \        _
            /"   "~-(r r  _/_--._~-/    /      /,.--^-._   / Y
            "-._    '"~~~>-._~]>--^---./____,.^~        ^.^  !
                ~--._    '   Y---.                        \./
                     ~~--._  l_   )                        \
                           ~-._~~~---._,____..---           \
                               ~----"~       \
                                              \

@benaryorg
Copy link
Collaborator

I think having cat just do nothing and return successfully (true) is more subtle and confusing, hence I'd prefer that one, I can't speak for everyone though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants