We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Any computer progammers out there

rde
rde Posts: 67 Forumite
My apologies if I am posting this to the wrong board but I have a puzzle which is driving me bonkers. Moderators, feel free to move my post to a suitable forum.

In my spare time I do geocaching, a sort of high (ish) tech treasure hunt. For more information go here. One of my local caches has a puzzle to work out to get the co-ords for it. This involves working our some program code. I have supplied the code as a picture file enclosed. FYI the suggested parking co-ords are N 51° 41.989 W 002° 01.497 . If you would like to do the cache the page can be found here.

If anyone can explain to me what is going on I would appreciate it. An answer would be fantastic. You can check your answer here.

goecachegc2qr3.jpg

Comments

  • closed
    closed Posts: 10,886 Forumite
    edited 15 March 2011 at 12:41AM
    it's shell script.

    echo prints some text
    cat copies the contents of a file
    bc does some maths, scale=3 means to 3 decimal points
    \c means don't start a new line
    touch either creates an empty file, or updates the timestamp on a file
    rm deletes a file
    > creates a file containing the contents of the previous command
    | (pipe) passes the output of the previous command to a new command
    >> appends the previous output on the end of a file
    tr translates (shifts) in this case any 0-9 numbers to 3-9, and 0-2
    read reads data into a variable

    the tr command is doing the decrypting

    in the cat north2 line a 0 will become a 3, a 1 a 4, a 9 will become a 2 etc.

    http://www.softpanorama.org/Tools/tr.shtml
    !!
    > . !!!! ----> .
  • rde
    rde Posts: 67 Forumite
    Many thanks Closed for the hints, I've managed to work it out. As you say it's the tr command that does the work.

    Again many thanks!!
  • closed
    closed Posts: 10,886 Forumite
    and the subtraction/addition in the bc lines
    !!
    > . !!!! ----> .
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 351.7K Banking & Borrowing
  • 253.4K Reduce Debt & Boost Income
  • 454K Spending & Discounts
  • 244.7K Work, Benefits & Business
  • 600.1K Mortgages, Homes & Bills
  • 177.3K Life & Family
  • 258.4K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.2K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.