Try to replace all new lines with spaces after conversion to ascii, maybe no more breaky.
This commit is contained in:
parent
e287c4086b
commit
6169839348
@ -1,6 +1,6 @@
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
|
||||
fml="$(curl -Ls --connect-timeout 5 https://fmylife.com/random | grep -m1 -A1 '<a class="article-link" href="/article/.*>' | tail -1 | w3m -dump -T text/html | tr '[:space:]' ' ' | iconv -f utf-8 -t ascii)"
|
||||
fml="$(curl -Ls --connect-timeout 5 https://fmylife.com/random | grep -m1 -A1 '<a class="article-link" href="/article/.*>' | tail -1 | w3m -dump -T text/html | iconv -f utf-8 -t ascii | tr '[:space:]' ' ')"
|
||||
|
||||
if [[ ${#fml} -gt 10 ]]; then
|
||||
msg "$2" "${fml}"
|
||||
|
Loading…
Reference in New Issue
Block a user