TSo yesterday I spent a good while looking for options that didn’t require me to memorize a huge long string just to post to twitter, and I thought I had found one until I realized that nope, that only works if your in the same bash session and won’t still be there after a reboot or even just a new terminal window.

So trial and error and I have the solution!

in a terminal window go to /usr/local/bin

[codesyntax lang="bash" lines="no"]

[/codesyntax]

then make a file called twitter

[codesyntax lang="bash" lines="no"]

touch twitter

[/codesyntax]

then open it

[codesyntax lang="bash" lines="no"]

nano twitter

[/codesyntax]

and add this command replacing username and password with YOUR twitter account info

[codesyntax lang="bash" lines="no"]
curl –basic –user “username:password” –data-ascii “status=echo $@|tr ' ' '+'” “http://twitter.com/statuses/update.json”
[/codesyntax]
——–EDIT!———
I can’t believe I didn’t tell you how to actually post! It’s simple, in your terminal window, just enter
[codesyntax lang="bash" lines="no"]
twitter “Your message goes between the double quotes @danstinebaugh”
[/codesyntax]
That’s it!