Fixed read to prevent mangling backslashes
This commit is contained in:
parent
dece3c5934
commit
ff77585d33
@ -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>';
|
||||
|
@ -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…
Reference in New Issue
Block a user