#!/usr/bin/env bash

output_file_name="$1"
number_count="$2"

IFS='' read -r -d '' prefix <<"EOF"
<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <title>Numbers</title>
  </head>
  <body>
EOF

echo "$prefix" > "$output_file_name"
for (( i = 1; i <= "$number_count"; ++i )) ; do
    echo "<p>$i</p>" >> "$output_file_name"
done

echo $'  </body>\n</html>' >> "$output_file_name"
