Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72416

Break lines in bash to HTML format

$
0
0

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

Viewing all articles
Browse latest Browse all 72416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>