Add Content with Script

We will write a shell script to add content and test it here. Expect to see lots of dates.

We will write a script that will find a code block and append a line to it.

Script Adds Lines Here Sat Jun 19 12:10:59 PDT 2021 Sat Jun 19 12:11:31 PDT 2021 Sat Jun 19 19:32:31 UTC 2021 Sun Jun 20 16:28:25 UTC 2021 Mon Jun 21 00:55:51 UTC 2021

We've written this as a deno script. Deno requires that we individually grant the ability to read and write local files. Omit --allow-write when testing that arguments have been specified correctly.

This script adds to a local wiki farm. Add the script to a server and invoke with ssh to update remote pages.


The command was long one but ran to completion through ssh once I installed deno the same way.

ssh asia 'date | /root/.deno/bin/deno run --allow-env --allow-read --allow-write .wiki/ add-content-with-script code'