5 creative ways to print Hello World in the Linux Terminal + Bonus

Using Intervee.io, we created a simple challenge that requests solvers to print “Hello World” without using the letter W in the command.
The challenge was written mostly for beginners and was combined with a virtual assistant that accompanied the solvers during the solution, so solvers without previous experience could also solve it and learn a few new tricks.
In this post, we will share interesting statistics and solutions.

Link to the challenge: https://platform.intervee.io/challengeinfocard/bash_world

(148 users tried to solve it, but only 38 solved it without hints from the virtual assistant)

It seems that most of the users (148-64 = 84) that didn’t solve it, were without previous experience in Linux.
This challenge was difficult for juniors but should be easy for solvers with 2+ year of experience (the solvers were asked about their experience, so some of the statistics here are based on their answers).

The 5 best shortest solutions:

echo hello vorld | tr [u-x] [v-y]

The command tr replaces u,v,w,x by v,w,y,z (u->v, v->w, w>y,x>z). So vorld is replaced with world.

echo "aGVsbG8gd29ybGQK" | base64 -d

The value aGVsbG8gd29ybGQK is Hello World in base64. You can check it here: https://www.base64decode.org/

printf 'Hello, \x77orld!\n'

This is the recommended solution. The virtual assistant advised the solvers to use printf if they got stuck for a long time.

echo "Hello $(date|cut -c 1)orld"

A cool solution that works only on Wednesday.

</dev/null awk 'BEGIN {print "hello \167orld";}'

Nice trick with awk.

echo -e 'hello \x57orld'

The most common solution was printf (70% of the solvers).

Juniors (0-2 years of experience) vs Seniors (2+):
The options are : bad, neutral or good.
All juniors and most of the seniors rated the challenge as Good. Some seniors rated neutral. No one rated it as bad.
The average solving time for seniors was 6.6 minutes. Juniors 12.3 minutes.

Using Google:
Juniors switched tabs 13 times (on average) during the challenge. Seniors only 7.
Using other tabs like google is a must, and it seems that solvers with more experience did it more efficiently.
Asking for hints:
Juniors asked for hints 2x times compared to Seniors, which makes sense.

New command learned:
Most of the commands (tr, print, based64 -d) were new to the solvers, or at least they needed to use google before using those commands. I was not familiar with the tr command.

We did a similar exercise in Python and C, as you can see here:

Bonus – Linux course with a virtual mentor – coming soon.
The challenge was part of a free Linux course with a virtual mentor that we are working on those days.
In the meantime, you can try the virtual mentor in the Python basic course at this link: https://platform.intervee.io/courses

Do you have another unique solution? Let us know 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *