Browse Source

Fixed read to prevent mangling backslashes

master
Ben Ashton 2 years ago
parent
commit
ff77585d33
  1. 2
      README.md
  2. 2
      example_templates/readme_example.n0m

2
README.md

@ -50,7 +50,7 @@ printf '%s\n' '</h1>';
printf '%s\n' ' <p>From the following restaurants:</p>';
printf '%s\n' ' <ul>';
# Loop through restaurants and display each one
while read restaurant; do
while read -r restaurant; do
printf '%s' ' <li>';
printf '%s' "$restaurant" | jq -Rrj @html;
printf '%s\n' '</li>';

2
example_templates/readme_example.n0m

@ -10,7 +10,7 @@ $ title='My Restaurant Randomizer';
<p>From the following restaurants:</p>
<ul>
# Loop through restaurants and display each one
$ while read restaurant; do
$ while read -r restaurant; do
<li><% $restaurant %></li>
$ done <restaurants.txt
</ul>

Loading…
Cancel
Save