2022-09-04 12:53:04 -07:00
|
|
|
#!/usr/bin/env n0m
|
2022-09-02 23:49:20 -07:00
|
|
|
$ #!/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>
|
2022-09-03 00:28:35 -07:00
|
|
|
# Loop through restaurants and display each one
|
2022-09-03 01:25:44 -07:00
|
|
|
$ while read -r restaurant; do
|
2022-09-02 23:49:20 -07:00
|
|
|
<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>
|