specify template to mktemp(1)

mktemp(1) is not specified by POSIX and accordingly inconsistent
across systems - e.g. non-GNU-implementations requiring that there
be some sort of template specified. this appears to be the simplest
more-or-less portable invocation.

use the user name as part of the name for temporary files.
This commit is contained in:
Matthias Rampke
2012-06-26 20:04:50 +02:00
parent 869ceb0398
commit d3443a2a8a

View File

@@ -36,8 +36,8 @@ do
echo $1 tweet total "$twitter_total" is greater than the already saved "$saved" echo $1 tweet total "$twitter_total" is greater than the already saved "$saved"
echo Trying to get $(($twitter_total - $saved)) echo Trying to get $(($twitter_total - $saved))
temp=$(mktemp) temp=$(mktemp "$1.XXXX")
temp2=$(mktemp) temp2=$(mktemp "$1.XXXX")
url="${api}screen_name=${1}&count=200&page=${page}${since}&include_rts=true&trim_user=1&include_entities=1" url="${api}screen_name=${1}&count=200&page=${page}${since}&include_rts=true&trim_user=1&include_entities=1"