Remove a rather useless eval in the chat/answer example

此提交包含在:
Alexei Sorokin
2016-08-22 01:23:27 +03:00
父節點 2d96423021
當前提交 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