User Tools

Site Tools


code:shell:post-a-twitter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
code:shell:post-a-twitter [2012/12/26 23:17] percycode:shell:post-a-twitter [2012/12/26 23:28] percy
Line 8: Line 8:
  
   ./twitter.sh "post a tweet with twitter.sh"   ./twitter.sh "post a tweet with twitter.sh"
 +  ./twitter.sh "`uptime`"
 +  
 +Auto cut the length limit to 140:
 +<file BASH twitter.sh>
 +#!/bin/sh
 +
 +msg=`echo ${@}|cut -b 1-140`
 +
 +curl -d "username=xxx&password=xxx&message=${msg}" -k https://216.24.xxx.xxx:8443/HelloServlet/s1/UpdateStatus
 +
 +</file>
 +  
/var/www/dokuwiki/wiki/data/pages/code/shell/post-a-twitter.txt · Last modified: 2016/05/05 13:07 by 127.0.0.1