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' ' <p>From the following restaurants:</p>';
|
||||||
printf '%s\n' ' <ul>';
|
printf '%s\n' ' <ul>';
|
||||||
# Loop through restaurants and display each one
|
# Loop through restaurants and display each one
|
||||||
while read restaurant; do
|
while read -r restaurant; do
|
||||||
printf '%s' ' <li>';
|
printf '%s' ' <li>';
|
||||||
printf '%s' "$restaurant" | jq -Rrj @html;
|
printf '%s' "$restaurant" | jq -Rrj @html;
|
||||||
printf '%s\n' '</li>';
|
printf '%s\n' '</li>';
|
||||||
|
@ -10,7 +10,7 @@ $ title='My Restaurant Randomizer';
|
|||||||
<p>From the following restaurants:</p>
|
<p>From the following restaurants:</p>
|
||||||
<ul>
|
<ul>
|
||||||
# Loop through restaurants and display each one
|
# Loop through restaurants and display each one
|
||||||
$ while read restaurant; do
|
$ while read -r restaurant; do
|
||||||
<li><% $restaurant %></li>
|
<li><% $restaurant %></li>
|
||||||
$ done <restaurants.txt
|
$ done <restaurants.txt
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user