4 ms·
amusingly, the "one-line" server is not only "not really one line", but also contains a number of errors and other incongruities: 1. there's no reason to put :
by Hello71 10y ago
amusingly, the "one-line" server is not only "not really one line", but also contains a number of errors and other incongruities:
1. there's no reason to put : at the start
2. z=aa is the same length as z=$r
3. there are double quotes where there shouldn't be and none where there should
4. the sed quoting is wrong and only works since file names cannot be empty
5. useless use of subshells
6. won't work on echos which don't parse escape sequences or don't accept -e
7. parsing ls
but most importantly, the whole first part can easily use TLS with "openssl req -x509 -newkey rsa:4096 -nodes -subj /CN=localhost -keyout server.pem -out server.pem; openssl s_server".