View difference between Paste ID: 51VVpaME and p09bLdQ1
SHOW: | | - or go back to the newest paste.
1
#!/bin/bash
2
USERNAME="xxxxxxx"
3
PASSWORD="xxxxxxx"
4
5
uptime=$(</proc/uptime)
6
uptime=${uptime%%.*}
7
8
seconds=$(( uptime%60 ))
9
minutes=$(( uptime/60%60 ))
10
hours=$(( uptime/60/60%24 ))
11
days=$(( uptime/60/60/24 ))
12
13
URL=http://api.supertweet.net/1/statuses/update.xml
14-
echo $UPTIME
14+
echo $UPTIME
15
# Post to Twitter.
16
17
message="$days days, $hours hours, $minutes minutes, $seconds seconds"
18
19
result=`curl -u $USERNAME:$PASSWORD -d status="[Raspi Uptime] MEGATRON has a to$
20
21
22
exit 0