summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2019-05-22 21:08:15 -0600
committermo <mo.khan@gmail.com>2019-05-22 21:08:15 -0600
commit3809267a9612dc41126e9a0d51e4336aeb023e85 (patch)
treecabde540ae5ed66399ab4110a15e17040eef1dae /README.md
parent724b3d5335df7cf18c38b5e29288112f7b4ab413 (diff)
complete question on `at` and `mail`
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7a817b8..9436174 100644
--- a/README.md
+++ b/README.md
@@ -388,6 +388,15 @@ from the memory address instead of the value.
* If you have used neither `cout` nor `printf` in the first version, then replace what you have with `printf`.
## Explain how you can schedule the executable program to run at 1:00 a.m. and to take the input from a file, rather than the keyboard, without any changes to the source program.
+
+You can use the `at` program to run a script at a specific time.
+
+E.g.
+
+```bash
+$ at 1am -f script.sh
+```
+
## Explain how you can find the time it took the computer to execute your program.
You can use the `time` command.
@@ -423,3 +432,9 @@ The `sys` time is the time spent in kernel mode. The difference between
the `kernel`.
## Explain how the output of your program can be automatically emailed to your friend upon completion.
+
+You can pipe the output from the first program to the `mail` program.
+
+```bash
+$ curl -s -I https://www.mokhan.ca/ | mail -s "My Website" destination@example.org
+```