我正在尝试从日志文件中打印一些值,但是 echo 打印在一行中,我只想在新行上打印每个结果。
#!/bin/sh
echo "Content-type: text/html"
echo ""
echo "<html><head><title>Acessos do usuario"
echo "</title></head><body>"
echo "$(egrep 'kelsen.faria' /var/squid/logs/access_custom.log | awk '{ print "Data: " $1, "Usuario: " $9, "IP: " $4 }' | uniq)"
echo "</body></html>
谢谢!