fix shell expansion

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-05-22 08:33:29 +02:00
parent 0841633dd9
commit 53bab25459

View File

@ -11,7 +11,7 @@
# This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
#
#### $$VERSION$$ V0.94-7-g3d92bf3
#### $$VERSION$$ V0.94-8-g3d92bf3
#
# Exit Codes:
# - 0 sucess (hopefully)
@ -688,6 +688,7 @@ start_bot() {
fi
while true; do
UPDATE="$(getJson "$UPD_URL$OFFSET" | "${JSONSHFILE}" -s -b -n | iconv -f utf-8 -t utf-8 -c)"
UPDATE="${UPDATE//$/\\$}"
# Offset
OFFSET="$(grep <<< "${UPDATE}" '\["result",[0-9]*,"update_id"\]' | tail -1 | cut -f 2)"