ICT: Diary
D: 28 W: 05
| < | December 2021 | > | ||||
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
[ < ]
Tuesday, 28 December 2021 [ >
]
Creating a simple webserver with while & nc
The script:
#! /bin/sh
# Simple Web Server - Works on OpenBSD
# based on @antonmedv webserver:
# https://twitter.com/antonmedv/status/1474838597991813127
while :; do nc -Nl 1088 <<EOF
HTTP/1.1 200 OK
Content-Type: text/html
<html>
<head><title>Simple NC Web</title></head>
<body>
<h1> Current date is $(date) </h1>
</body>
</html>
EOF
done
Shell Script Debugging
This shell script was giving me an
syntax error:`while' unmatched
this was due to a missing done in the script. shellcheck is an excellent resource for checking shell scripts.
CSS
Ctrl + F5 to force CSS reload in Firefox.
$Id: dates.htm,v 1
$Id: diary,v 1.38 2025/01/01 22:43:54 fred Exp $