Mai 24, 2011

sudo make me a sandwich

Save this as "Makefile":

UID=$(shell id -u)
default:
        @echo "make love, not war!"
me:
        @if [ "${UID}" = "0" ];then echo "okay.";\
        else echo "What?";echo -n "make ";fi
a:
        @if [ "${UID}" != "0" ];then echo -n "it ";fi
sandwich:
        @if [ "${UID}" != "0" ];then echo "yourself.";fi

And execute it:

$ make me a sandwich
[...]
$ sudo make me a sandwich
[...]

If you do not understand it, read this XKCD-Comic.

Kategorien: Fun english Software
Tagged: Sandwich XKCD make sudo Comic Code Makefile

0 Kommentare

Kommentare

Kommentar schreiben