diff --git a/Clues/What/clue.js b/Clues/What/clue.js index 7a85ba9..1b456ac 100644 --- a/Clues/What/clue.js +++ b/Clues/What/clue.js @@ -1,6 +1,6 @@ console.log(`Here's what you need to do: -1. Touch a file called answer.txt by typing: +1. Create a file called answer.txt by typing: touch answer.txt 2. Check this by listing all the files in this folder: ls -a -2. Now change directory to the Who folder and find the answer`) \ No newline at end of file +2. Now change directory to the Who folder and find the answer`) diff --git a/Clues/Where/clue.js b/Clues/Where/clue.js index c50fd53..9507b67 100644 --- a/Clues/Where/clue.js +++ b/Clues/Where/clue.js @@ -1,5 +1,5 @@ console.log(`You got here by typing a relative path. Learn more about changing directory here: -https://alligator.io/workflow/command-line-basics-changing-directories/ +https://phoenixnap.com/kb/linux-cd-command Now change directory to ./How and get your next clue. -`) \ No newline at end of file +`) diff --git a/Clues/Who/clue.js b/Clues/Who/clue.js index 53983a3..7451e60 100644 --- a/Clues/Who/clue.js +++ b/Clues/Who/clue.js @@ -1,3 +1,20 @@ +let shaCommand; +switch (process.platform) { + case "darwin": + shaCommand = "shasum -a 256 answer.txt"; + break; + case "linux": + shaCommand = "sha256sum answer.txt"; + break; + case "win32": + shaCommand = "certutil -hashfile answer.txt SHA256" + break; + default: + console.log(`Oh no, we didn't recognise your operating system, process.platform = ${process.platform}`); + process.exit(1); + break; +} + console.log(`Who is never gonna give you up? Never gonna take you down? Never gonna run around and desert you? @@ -6,4 +23,10 @@ Put your answer in the answer.txt file you created. echo "ANSWER HERE" > answer.txt Now move this file to the Answer folder. How will you achieve this? Stay in the command line. (You can Google.) -`) \ No newline at end of file + +When you're done, run: + +${shaCommand} + +And paste the output into Slack thread 🧵 (create a new thread if there isn't one already). +`)