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.
Any computer progammers out there
rde
Posts: 67 Forumite
in Techie Stuff
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.
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.
0
Comments
-
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!!
> . !!!! ----> .0 -
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!!0 -
and the subtraction/addition in the bc lines!!
> . !!!! ----> .0
This discussion has been closed.
Categories
- All Categories
- 347.2K Banking & Borrowing
- 251.6K Reduce Debt & Boost Income
- 451.8K Spending & Discounts
- 239.4K Work, Benefits & Business
- 615.3K Mortgages, Homes & Bills
- 175.1K Life & Family
- 252.7K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 15.1K Coronavirus Support Boards