while true; do echo -e "HTTP/1.1 200 OK\n\n $(date)" | nc -l -p 8080; done
Been given this one liner to start a simple webserver on a raspberry pi for university. When connected it shows the day and date. I've been asked to simply change it so it displays with the text color as blue rather than black
I know html and css well, just not sure where to put it within this code or if i need to write it different
指定一种content-type
以用作text/html
然后可以使用内联样式的HTML标记。
while true ; do echo -e "HTTP/1.1 200 OK\rContent-type: text/html\n\n <span style='color: blue'>$(date)</span>" | nc -l -p 8080; done
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.