Hands-on task
A config via heredoc
Write /root/gen.sh that, using a heredoc, writes a multi-line config into /root/config.ini: a [server] section, and under it the lines host=localhost and port=8080. Run the script. The script is easiest to write in the Editor tab above the terminal.
- heredoc
- multi-line output
- cat to a file
- escaping substitutions
- chmod