This may be a very silly question, but I currently have a script that contains some HTML content. It's easy for me to create the HTML page after running the script by doing:
./scriptName.sh > test.html
However, what I would like to achieve is for the HTML page to be created within the script, and not pass it as an argument when executing it, nor have it specified in any way from the user.
In other words, I'd like for the script to run like:
./scriptName.sh
and within that script, for the HTML to be created similar to how it would be when passed at the execution.
Is this possible? If so, how would I achieve this?
For what it's worth, my script at a very simplistic level looks something like this:
#!/bin/bash
cat << _EOF_
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
_EOF_