Sunday, November 20, 2011

hello world

one day i heard  from my friend that in the internet there are various competitions about writing the smallest "hello world" application using desirable programming language.  i saw different implementation using asm, c, perl, python ...etc. the best score was 20 bytes at that moment.


i put up my mind to have a record... at that moment i had opened terminal window connected to my server via ssh, and the only thing which came up to my mind was to use bash )


what i did was:


echo hello world


when i put this line in a file, i run a command ls -l to see the size of my file... wauuu it was 17 bytes!







4 comments:

Tigran said...

And where is the trick?

Unknown said...

trick is in 17 bytes

Tigran said...

I think the point is to have binary, but you have txt file which is interpreted by bash binary, so it can be 17 bytes. No magic :)

Unknown said...

there was no requirements to have binary file. Requirement was to have small hello world program written in desired language.