I run this command on the server:
python3 -m http.server 8000 --cgi
I have an executable shell script in /cgi-bin :
#!/bin/bash
echo ''
cd /home/user
timeout 30 tail -f testlog.txt
The tail works successfully and I can see it in the browser AFTER the timer expires.
Is there a way to linebuffer python or something? I know tail already linebuffers it's output.