diff options
| author | mo <mo.khan@gmail.com> | 2019-05-22 21:08:15 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2019-05-22 21:08:15 -0600 |
| commit | 3809267a9612dc41126e9a0d51e4336aeb023e85 (patch) | |
| tree | cabde540ae5ed66399ab4110a15e17040eef1dae /README.md | |
| parent | 724b3d5335df7cf18c38b5e29288112f7b4ab413 (diff) | |
complete question on `at` and `mail`
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 +``` |
