Thursday, September 18, 2008

Sed scripts in Crystal City

So our company has gone further down the road of geek advertisements and recently plastered this shell command all over the Crystal City underground:
echo 'howsmartu ?' \
| sed -e '1,/^END/{ y/usr?hmowat /cwimwowwt.o/; }' \
| sed -e '1,/^END/{s/\(wo\)/.\1/; s|m|m/jobs/|; }' \
| xargs wget

Naturally, I have an improvement:

echo 'howsmartRu ?' \
| tr 'what Rumors?' 'wwoio.cwwt.m' \
| sed 's|m|m/jobs/|' \
| xargs wget -O -

Why mine is better:
  • it starts with a better initial message
  • initial message actually translates to www.woti.com
  • makes use of an anagram of that message
  • uses tr
  • prints output to stdout. I toyed with links, but sadly our jobs page only specifies the copyright message in text.

0 comments: