Try to replace all new lines with spaces after conversion to ascii, maybe no more breaky.

This commit is contained in:
Storm Dragon 2020-08-17 21:54:48 -04:00
parent e287c4086b
commit 6169839348
1 changed files with 1 additions and 1 deletions

View File

@ -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}"