Remove a rather useless eval in the chat/answer example
This commit is contained in:
parent
2d96423021
commit
788e3a9c7f
|
@ -36,7 +36,7 @@ if [[ "$string" == *http*://* ]]; then
|
||||||
sed -e '/https*:\/\//!d' ./frs.txt | sed -n "$(random "$amount")p"
|
sed -e '/https*:\/\//!d' ./frs.txt | sed -n "$(random "$amount")p"
|
||||||
img="$(printf "%s\n" "$string" | sed -ne 's|.*\(https*://[^ \"()<>]*\).*|\1|g;1p')"
|
img="$(printf "%s\n" "$string" | sed -ne 's|.*\(https*://[^ \"()<>]*\).*|\1|g;1p')"
|
||||||
ns="$(printf "%s\n" "$string" | sed -e "s|$img||g")"
|
ns="$(printf "%s\n" "$string" | sed -e "s|$img||g")"
|
||||||
cl="$(wget --spider -S $(eval printf '%s\n' '$img') 2>&1)"
|
cl="$(wget --spider -S "$img" 2>&1)"
|
||||||
if [[ $(printf "%s\n" "$cl" | sed -e '/Content-Type/!d;/image\//!d') ]]; then
|
if [[ $(printf "%s\n" "$cl" | sed -e '/Content-Type/!d;/image\//!d') ]]; then
|
||||||
#echo 'posting'
|
#echo 'posting'
|
||||||
printf "%s\n" "$img $from" >> ../data/pictures
|
printf "%s\n" "$img $from" >> ../data/pictures
|
||||||
|
|
Loading…
Reference in New Issue