I just checjed Bing to see if Microsoft was in such bad shapet today. asked it to make a bash shell script. looks ok to me :
Sure! Here’s a simple Bash script to create a web server without using Python. This script uses netcat (nc) to serve the HTML content:
#!/bin/bash
Create the HTML file
echo “<html> <head> <title>Announcement</title> </head> <body> <h1>The problems are temporary and not catastrophic. Full service will be restored soon.</h1> </body> </html>” > /tmp/announcement.html
Start a simple web server using netcat
while true; do { echo -ne “HTTP/1.1 200 OK\r\nContent-Length: $(wc -c < /tmp/announcement.html)\r\nContent-Type: text/html\r\n\r\n”; cat /tmp/announcement.html; } | nc -l -p 8080 -q 1; done
This script will continuously listen on port 8080 and serve the HTML file. You can stop the server by pressing Ctrl+C.
Let me know if you need any further assistance!
fin@sh.itjust.works 3 months ago
Your post is a bit irrelevant to the community. This place is for sharing news and articles.
Also, have you heard of the disappearance of Australia?
A_A@lemmy.world 3 months ago
Microsoft’s Bing search engine claims Australia doesn’t exist Crocodile Dundee would not be pleased 🤣👍