Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
#!/bin/sh user="user" pass="password" curl="/usr/bin/curl" if [ "$LC_CTYPE" != "UTF-8" ] then echo "Converting from $LC_CTYPE to UTF-8 ..." twit=$(echo "$@" | iconv -f "$LC_CTYPE" -t UTF-8) else twit=$@ fi $curl --basic --user "$user:$pass" --data-ascii \ "status=`echo $twit | tr ' ' '+'`" \ "http://twitter.com/statuses/update.json" >& /tmp/stu$$ error=$(grep -i "Something is technically wrong" /tmp/stu$$) if [ -n "$error" ] then echo "Something is technically wrong with Twitter. :-(" else echo "Twitter updated. :-)" fi rm /tmp/stu$$ exit 0
This paste will be private.
From the Design Piracy series on my blog: