(I found a perfect solution by using Google Forms and a simple curl command, I wrote it as an answer if anyone ever needs it)
I execute a long .sh script with thousands of commands and once a power outage occurs, I need a lot of time to determine which was the last executed command so I can resume working.
I need a creative solution first regarding where the log would be the best to be stored (locally, or on the net, google spreadsheet maybe), and second - a command that I will place on strategic lines in the script and whose sole purpose is to create a descriptive output in the log i.e. if I see 1-SVK in the log, I will be able to resume working within a minute.
So what is the best place to store such a log (non-sensitive data) for a start ? And what command should I use ?
Only the output of the most recent execution of that command should be logged, I will modify the command properly and place it on each strategic line in the script so it will provide a correct output in the log (ex: 1-SVK, 2-SVK).
The code in the bash script should look like this:
[command that will print 1-SVK somewhere]
curl command 1
curl command 2
curl command 3
[command that will print 2-SVK somewhere]
curl command 4
curl command 5
curl command 6
...
Thank you in advance for your valuable advice