Skip to content

Commit ab43e4c

Browse files
committed
weather-latvia: Use mask to choose city ID
1 parent 5aa84bd commit ab43e4c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

weather-latvia

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/zsh
22

3-
# In God We Trust †
3+
# Heil Christus † Gott Heil
44
#
5-
# A.D. MMXXV
5+
# A.D. MMXXVI
66

77
ID="P269"
88
NAME="Rīga, Rīgas pilsēta"
@@ -17,7 +17,7 @@ if [[ -n "$1" ]]; then
1717
for l in "${R[@]}"; do echo $l; done
1818
echo
1919
read ans\?"Which one? "
20-
IFS=$'\t' read ID NAME <<< "${R[(r)$ans *]}"
20+
IFS=$'\t' read ID NAME <<< "${R[(r)*$ans* *]}"
2121
else
2222
IFS=$'\t' read ID NAME <<< "$R"
2323
fi

0 commit comments

Comments
 (0)