X-Git-Url: https://iankelling.org/git/?p=iankelling.org;a=blobdiff_plain;f=get-comments;h=36563b84afa7e5783648f43f7628dfed9c3330ca;hp=36bbe0dfca800540ea439a254da9a0ca044544ca;hb=5040f995733cbd639d31f4b41f670f9ff6e431c6;hpb=d0a5b73d2a275bfff5957961f2360df8966bee22 diff --git a/get-comments b/get-comments index 36bbe0d..36563b8 100755 --- a/get-comments +++ b/get-comments @@ -24,7 +24,7 @@ shell="ssh iankelling.org" while [[ $1 ]]; do case $1 in -a) all=true; shift ;; - -l) shell= ; shift ;; # -l for local + -l) shell= ; shift ;; # -l for local site instead of iankelling.org esac done @@ -41,9 +41,9 @@ EOF fi # we may want to avoid rate limited posts here too. -sql="select * from c" +sql="select * from c;" if [[ $date ]]; then - date_clause=" where date > cast('$date' as real)" + sql+=" where date > cast('$date' as real)" fi -echo "$sql" -$s "$sql" > /tmp/hcomments +echo "executing: $sql" +$s > /tmp/hcomments <<<"$sql"