First of all, I don't think the /bin/sh is needed, because the first line in the script already calls /bin/bash to run itself.
Second, it seems like putting the sent data in the cronjob command itself is a rather sloppy way to go about it. Why not include the uptime information in the script itself instead? You can use the
function syntax, which will make it easier to modify or add other information in the future the same way.
Code:
#!/bin/bash
function MYUPTIME {
echo "My PC uptime is: $(uptime)"
}
curl -u username:password -d status=$(MYUPTIME) http://twitter.com/statuses/update.xml
then your cronjob can be simply:
Code:
*/10 * * * * /path/to/your/twitter/script.sh
Edit: Come to think about it, the /bin/sh is probably there because it needs to run the $(uptime) command outside of the script. Moving uptime inside the script is what makes it unnecessary.