From 9c189b94ffb44cf9045e27af229219191cc71303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kydl=C3=AD=C4=8Dek?= Date: Thu, 25 Apr 2024 09:11:13 +0200 Subject: [PATCH] Nonescaped characters no longer showing up in the results --- zradylko.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/zradylko.sh b/zradylko.sh index 166f42b..2bbed6d 100755 --- a/zradylko.sh +++ b/zradylko.sh @@ -13,29 +13,29 @@ get_zradylko() { case "$day_of_week" in 1) - soup=$(echo "$html_snippet" | grep -oP '(?<=

Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1') - main_course=$(echo "$html_snippet" | grep -oP '(?<=

Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1') - weekly_course=$(echo "$html_snippet" | grep -oP '(?<=

Celý týden nabízíme

).*?(?=<\/table>)' | sed 's/<[^>]*>//g') + soup=$(echo "$html_snippet" | grep -oP '(?<=

Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/ / /g') + main_course=$(echo "$html_snippet" | grep -oP '(?<=

Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/ / /g') + weekly_course=$(echo "$html_snippet" | grep -oP '(?<=

Celý týden nabízíme

).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/ / /g') ;; 2) - soup=$(echo "$html_snippet" | grep -oP '(?<=

Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==2') - main_course=$(echo "$html_snippet" | grep -oP '(?<=

Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==2') - weekly_course=$(echo "$html_snippet" | grep -oP '(?<=

Celý týden nabízíme

).*?(?=<\/table>)' | sed 's/<[^>]*>//g') + soup=$(echo "$html_snippet" | grep -oP '(?<=

Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/ / /g') + main_course=$(echo "$html_snippet" | grep -oP '(?<=

Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==2' | sed 's/ / /g') + weekly_course=$(echo "$html_snippet" | grep -oP '(?<=

Celý týden nabízíme

).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/ / /g') ;; 3) - soup=$(echo "$html_snippet" | grep -oP '(?<=

Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==3') - main_course=$(echo "$html_snippet" | grep -oP '(?<=

Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==3') - weekly_course=$(echo "$html_snippet" | grep -oP '(?<=

Celý týden nabízíme

).*?(?=<\/table>)' | sed 's/<[^>]*>//g') + soup=$(echo "$html_snippet" | grep -oP '(?<=

Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/ / /g') + main_course=$(echo "$html_snippet" | grep -oP '(?<=

Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==3' | sed 's/ / /g') + weekly_course=$(echo "$html_snippet" | grep -oP '(?<=

Celý týden nabízíme

).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/ / /g') ;; 4) - soup=$(echo "$html_snippet" | grep -oP '(?<=

Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==4') - main_course=$(echo "$html_snippet" | grep -oP '(?<=

Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==4') - weekly_course=$(echo "$html_snippet" | grep -oP '(?<=

Celý týden nabízíme

).*?(?=<\/table>)' | sed 's/<[^>]*>//g') + soup=$(echo "$html_snippet" | grep -oP '(?<=

Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/ / /g') + main_course=$(echo "$html_snippet" | grep -oP '(?<=

Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==4' | sed 's/ / /g') + weekly_course=$(echo "$html_snippet" | grep -oP '(?<=

Celý týden nabízíme

).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/ / /g') ;; 5) - soup=$(echo "$html_snippet" | grep -oP '(?<=

Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==5') - main_course=$(echo "$html_snippet" | grep -oP '(?<=

Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==5') - weekly_course=$(echo "$html_snippet" | grep -oP '(?<=

Celý týden nabízíme

).*?(?=<\/table>)' | sed 's/<[^>]*>//g') + soup=$(echo "$html_snippet" | grep -oP '(?<=

Polévka<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==1' | sed 's/ / /g') + main_course=$(echo "$html_snippet" | grep -oP '(?<=

Hlavní jídlo<\/h2>).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | awk 'NR==5' | sed 's/ / /g') + weekly_course=$(echo "$html_snippet" | grep -oP '(?<=

Celý týden nabízíme

).*?(?=<\/table>)' | sed 's/<[^>]*>//g' | sed 's/ / /g') ;; *) echo "Spatnej den v tydnu brasko"