A shell script template engine for generating HTML markup
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

23 lines
548 B

#!/usr/bin/env n0m
$ #!/bin/sh
$ title='My Restaurant Randomizer';
<!doctype html>
<html>
<head>
<title><% $title %></title>
</head>
<body>
<h1>Welcome to <% $title %></h1>
<p>From the following restaurants:</p>
<ul>
# Loop through restaurants and display each one
$ while read -r restaurant; do
<li><% $restaurant %></li>
$ done <restaurants.txt
</ul>
<p>
The fates have decided that you shall eat at:
<strong><$% shuf -n 1 restaurants.txt %></strong>
</p>
</body>
</html>