Competition time

Starting with issue 1, Linux Voice is holding monthly competitions to test out your Linux skills. The first is a grep challenge. If you’re unfamiliar with grep, there’s a great tutorial on getting started in the magazine, or you should also be able to find plenty on help online. It’s a really useful tool for working with text files, and word games are a great way to familiarise yourself with how it works. The competition’s open to all, and is an excellent way to test your grep skills.

The two winning entries (see below) will each receive a Linux Voice winners t-shirt. These will only ever be available to Linux Voice challenge winners, so there’s no better way to show off your leet Linux skills to the world.

You can see the magazine page (with a few extra grep challenges) here:
 

bash

The extra challenges are (though there’s no prizes for these):

  • Anagrams
  • Countdown (find the longest word using only those letters)
  • Encryption (solve the substitution cipher)
  • Word Wheel (find as many words as you can that include the middle letter plus two or more of the outer letter)
  • Word Ladder (change one letter each step to get from the top word to the bottom word

 

They can all be easily solved with grep (and maybe a little Bash scripting). More details are in the magazine.

The prize challenge is a little more tricky. You can find it in the image, but the full text is here for convenience:

 

The final challenge is something different, one we haven’t covered so far: a word search. To make matters a little easier, there are only horizontal words, and none of them are backwards. The challenge is to write a Bash script that can go in the following pipe:

cat wordsearch.txt | bash yourscript.sh

and output all of the three or more letter words from the words list (/usr/share/dict/words or usr/dict/words) that are in the file. You can use the word list here if you don’t have one on your distro. The word search text is:
 
zfghellohb
binarytwno
thisenthat
dfjunglwmr
scoffeeqwj
lhzniphoto
rlightovqx
yelsocketn
fbicycleow
ykerolbuha
 
To make things interesting, there will be two prizes, one for the smallest (in terms of characters in the Bash script, not including comments), and one for the one that runs fastest (completes execution with all the words found in the shortest time). The words must be found with a form of GNU grep (egrep, pgrep, etc.) matching a regular expression. There are few differences between versions of Bash on different Linuxes, so we’ll be testing on a fresh install of Debian Unstable. This is only likely to matter if you’re relying on particularly new or exotic features. To be eligible, your program must be licensed under an OSI-approved licence compatible with the GPL v2 or v3. We recommend using GPLv3.

All entries must be sent to ben@linuxvoice.com by 31 March, and the winner will be announced in issue 3 (and on linuxvoice.com). You don’t have to have bought a magazine to enter. In the event of a tie, the solution that was sent in first will win. In all matters, the editor’s decision will be final.


Good luck, and we look forward to seeing your entry.

8 Comments

Add a Comment

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