I'm having problems doing a break line between the IP addresses. They appear in 1 long horizontal line. I am able to do a break line on the first script, but it still appears in 1 line.
script #1 (showblock.sh)
command=$(pfctl -t bruteforce -T show)
my_array="${command[@]}"
for i in "${my_array[@]}"
do
:
# do whatever on $i
printf "%s\n""${my_array[@]}"
done
script # 2 (showBlockOutput.sh)
#!/bin/sh
current_date=$(date)
output=$(showblock.sh)
OUT=oldBlocks/ipblock.html
cat << EOF > $OUT
<html>
<head>
<meta http-equiv="refresh" content="30">
</head>
<body>
<h1>Blocked IPs</h1>
$current_date <br>
$output
<br>
</body>
</html>
EOF