Update twitter via curl as Function

tweet(){ curl -u "$1" -d status="$2" "http://twitter.com/statuses/update.xml"; }
Type the command in the terminal and press enter to create the tweet() function. Then run as follows: tweet MyTwitterAccount "My message goes here" It will prompt you for password. Make sure that you use escape "\" character in message for showing varialbles or markup.

0
By: Code_Bleu
2009-08-23 16:56:24

6 Alternatives + Submit Alt


  • 165
    curl -u user:pass -d status="Tweeting from the shell" http://twitter.com/statuses/update.xml
    adamm9 · 2009-02-05 18:33:23 31
  • An improvement of the original (at: http://www.commandlinefu.com/commands/view/2872/update-twitter-via-curl) in the sense that you see a "from cURL" under your status message instead of just a "from API" ;-) Twitter automatically links it to the cURL home page. Show Sample Output


    14
    curl -u twitter-username -d status="Hello World, Twitter!" -d source="cURL" http://twitter.com/statuses/update.xml
    MyTechieself · 2009-12-08 14:54:33 1
  • Doesn't require password (asks for it instead) Show Sample Output


    11
    curl -u user -d status="Tweeting from the shell" http://twitter.com/statuses/update.xml
    matthewbauer · 2009-08-05 02:24:01 3
  • This version of tweet() doesn't require you to put quotes around the body of your tweet... it also prompts you for password. It will still barf on a '!' character.


    7
    tweet () { curl -u UserName -d status="$*" http://twitter.com/statuses/update.xml; }
    bartonski · 2009-11-07 06:54:02 0
  • Found it on snipt, pok3, is it yours? I put my user = m33600, the password and the status was my robot message: Settima robot message: ALARM ZONE 3 (sent via command line). Now bots may have their identity on twitter... Show Sample Output


    2
    curl -u YourUsername:YourPassword -d status="Your status message go here" http://twitter.com/statuses/update.xml
    m33600 · 2009-06-27 21:47:48 7

What Others Think

This works great! anyway that you could make this into a .bashrc alias?
danstinebaugh · 639 weeks and 3 days ago
I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really great : D. Good job, cheers find" rel="nofollow">http://personeriadebarranquilla.gov.co/?option=com_k2&view=itemlist&task=user&id=3107'>find this
bojokey283 · 78 weeks and 1 day ago
I love the way you write and share your niche! Very interesting and different! Keep it coming! read more
xoheko1229 · 78 weeks and 1 day ago
I love the way you write and share your niche! Very interesting and different! Keep it coming! read more
xoheko1229 · 78 weeks and 1 day ago
Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!. AC drive
bojokey283 · 76 weeks and 6 days ago
I love the way you write and share your niche! Very interesting and different! Keep it coming! coronavirus cancun
bojokey283 · 76 weeks and 5 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. carpet cleaning services
bojokey283 · 75 weeks and 6 days ago
I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information. cheap cloudlinux license
bojokey283 · 73 weeks and 5 days ago
Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon. https://www.shopfloor-analytics.de/
bojokey283 · 73 weeks and 3 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. isla mujeres mexico
bojokey283 · 73 weeks and 1 day ago
Great Information sharing .. I am very happy to read this article .. thanks for giving us go through info.Fantastic nice. I appreciate this post. schlüsseldienst köln
bojokey283 · 72 weeks and 6 days ago
If you set out to make me think today; mission accomplished! I really like your writing style and how you express your ideas. Thank you. industrial chemical products
xoheko1229 · 71 weeks and 6 days ago
Please continue this great work and I look forward to more of your awesome blog posts. playa del carmen
bojokey283 · 71 weeks and 3 days ago
I high appreciate this post. It’s hard to find the good from the bad sometimes, but I think you’ve nailed it! would you mind updating your blog with more information? yucatan cenotes map
xoheko1229 · 70 weeks and 1 day ago
I really needed this. Thanks. expert roofing Cairns
FLM76 · 70 weeks ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. rumah pintar
bojokey283 · 69 weeks and 3 days ago
I love the way you write and share your niche! Very interesting and different! Keep it coming! cozumel bar
xoheko1229 · 68 weeks and 5 days ago
Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place.. Cozumel
xoheko1229 · 68 weeks and 3 days ago
I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well! Papadzules
xoheko1229 · 68 weeks and 3 days ago
This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again. best area to stay in tulum
xoheko1229 · 68 weeks and 2 days ago
This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again. best restaurant in tulum mexico
xoheko1229 · 68 weeks and 1 day ago
This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again. tulum mayans
xoheko1229 · 68 weeks ago
Great articles and great layout. Your blog post deserves all of the positive feedback it’s been getting. attractions in cancun
xoheko1229 · 67 weeks and 6 days ago
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. best all inclusive hotels in playa del carmen
xoheko1229 · 67 weeks and 6 days ago
This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!. isla mujeres cancun
xoheko1229 · 67 weeks and 4 days ago
Really a great addition. I have read this marvelous post. Thanks for sharing information about it. I really like that. Thanks so lot for your convene. beaches in holbox
xoheko1229 · 67 weeks and 3 days ago
Nice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best. best restaurant in holbox
xoheko1229 · 67 weeks and 3 days ago
I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it.. best hotel holbox
xoheko1229 · 67 weeks and 3 days ago
I am definitely enjoying your website. You definitely have some great insight and great stories. treatnheal https://www.treatnheal.com/
xoheko1229 · 66 weeks ago
Great articles and great layout. Your blog post deserves all of the positive feedback it’s been getting. treatnheal
xoheko1229 · 65 weeks and 5 days ago
This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again. Automatyka domowa
xoheko1229 · 65 weeks and 2 days ago
This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again. Automatyka domowa
xoheko1229 · 65 weeks and 2 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. bathroom vanity
bojokey283 · 64 weeks and 1 day ago
Thanks for your insight for your fantastic posting. I’m glad I have taken the time to see this. tulum resorts all inclusive adults only
xoheko1229 · 63 weeks and 2 days ago
You’ve got some interesting points in this article. I would have never considered any of these if I didn’t come across this. Thanks!. covid mexico
bojokey283 · 63 weeks ago
Nice knowledge gaining article. This post is really the best on this valuable topic. taroko gorge hikes
xoheko1229 · 62 weeks and 6 days ago
This is great information. Thank you for sharing it. roof repair Cairns
MaryJ27 · 62 weeks and 4 days ago
Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. Taiwan covid
bojokey283 · 62 weeks and 4 days ago
Thank you again for all the knowledge you distribute,Good post. I was very interested in the article, it's quite inspiring I should admit. I like visiting you site since I always come across interesting articles like this one.Great Job, I greatly appreciate that.Do Keep sharing! Regards, Mediterranean food catering near me
xoheko1229 · 61 weeks and 5 days ago
I read that Post and got it fine and informative. RC toy cars
xoheko1229 · 57 weeks and 5 days ago
Thanks for your information, it was really very helpfull.. cozumel diving
xoheko1229 · 56 weeks and 5 days ago
Thanks for your information, it was really very helpfull.. cozumel dive
xoheko1229 · 56 weeks and 5 days ago
Thanks for sharing the post.. parents are worlds best person in each lives of individual..they need or must succeed to sustain needs of the family. cozumel snorkeling
xoheko1229 · 54 weeks and 6 days ago
Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging, http://www.gtechoh.com/">Clogged sink
xoheko1229 · 54 weeks and 4 days ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. Dr. G?z Péter ügyvéd Debrecen
xoheko1229 · 54 weeks and 3 days ago
I have been checking out a few of your stories and i can state pretty good stuff. I will definitely bookmark your blog Boat Charter St Thomas
xoheko1229 · 54 weeks and 2 days ago
Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!THANKS!!!!!! Smart home security
xoheko1229 · 53 weeks and 3 days ago
I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post. Gestione documenti cloud
xoheko1229 · 53 weeks ago
Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. applicant tracking system
xoheko1229 · 52 weeks and 4 days ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. Thought leader
xoheko1229 · 51 weeks and 6 days ago
Great Article it its really informative and innovative keep us posted with new updates. its was really valuable. thanks a lot. snorkel in cozumel
xoheko1229 · 51 weeks and 3 days ago
Thanks for the nice blog. It was very useful for me. I'm happy I found this blog. Thank you for sharing with us,I too always learn something new from your post. Heilpraktiker Wiesbaden
xoheko1229 · 51 weeks and 1 day ago
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. Beratung zur Baufinanzierung
xoheko1229 · 50 weeks and 4 days ago
Excellent website you have here, so much cool information!.. Tree Services
xoheko1229 · 49 weeks and 3 days ago
Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. cozumel
xoheko1229 · 49 weeks and 3 days ago
Great content material and great layout. Your website deserves all of the positive feedback it’s been getting. cozumel
xoheko1229 · 49 weeks and 3 days ago
This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion, thank you. Introvert Meaning
xoheko1229 · 49 weeks and 2 days ago
I found your this post while searching for some related information on blog search...Its a good post..keep posting and update the information. tulum all inclusive resort
xoheko1229 · 48 weeks and 3 days ago
I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information. lifestyleovy blog
xoheko1229 · 48 weeks ago
I am hoping the same best effort from you in the future as well. In fact your creative writing skills has inspired me. modern house architecture design
xoheko1229 · 47 weeks and 1 day ago
Great content material and great layout. Your website deserves all of the positive feedback it’s been getting. holbox hotel
xoheko1229 · 47 weeks and 1 day ago
I admit, I have not been on this web page in a long time... however it was another joy to see It is such an important topic and ignored by so many, even professionals. professionals. I thank you to help making people more aware of possible issues. many business plans
xoheko1229 · 47 weeks ago
Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. zahradny nabytok
xoheko1229 · 46 weeks and 6 days ago
I like this post,And I guess that they having fun to read this post,they shall take a good site to make a information,thanks for sharing it to me. http://www.homeworkmaven.com/">homeworkmaven.com
xoheko1229 · 46 weeks and 6 days ago
This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work https://eclipse-health.com
xoheko1229 · 46 weeks ago
Thanks for the nice blog. It was very useful for me. I'm happy I found this blog. Thank you for sharing with us,I too always learn something new from your post. resume format
xoheko1229 · 45 weeks and 1 day ago
Great content material and great layout. Your website deserves all of the positive feedback it’s been getting. introverts definition
xoheko1229 · 44 weeks and 4 days ago
Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. dcf model
xoheko1229 · 44 weeks and 3 days ago
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. denver to vail limo
xoheko1229 · 44 weeks and 2 days ago
Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging.. android tips
xoheko1229 · 42 weeks and 6 days ago
Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. perfect health
xoheko1229 · 42 weeks and 2 days ago
i am for the first time here. I found this board and I in finding It truly helpful & it helped me out a lot. I hope to present something back and help others such as you helped me. learn here
xoheko1229 · 41 weeks and 5 days ago
I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You. visit here
xoheko1229 · 41 weeks and 5 days ago
I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You. visit here
xoheko1229 · 41 weeks and 5 days ago
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value. Im glad to have found this post as its such an interesting one! I am always on the lookout for quality posts and articles so i suppose im lucky to have found this! I hope you will be adding more in the future... cancun all inclusive resorts
xoheko1229 · 41 weeks and 3 days ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. coronavirus British virgin islands
xolabemo · 38 weeks and 6 days ago
This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again. This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again.
xolabemo · 36 weeks and 3 days ago
You’ve got some interesting points in this article. I would have never considered any of these if I didn’t come across this. Thanks!. Web Communication Tools
xolabemo · 36 weeks and 2 days ago
Please let me know if you’re looking for a article writer for your site. You have some really great posts and I feel I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some material for your blog in exchange for a link back to mine. Please send me an email if interested. Thank you! Cherada
xolabemo · 36 weeks and 1 day ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.best hotels in turks and caicos
xolabemo · 25 weeks and 2 days ago
I felt very happy while reading this site. This was really very informative site for me. I really liked it. This was really a cordial post. Thanks a lot!.st barts all inclusive resorts
xolabemo · 22 weeks and 3 days ago
Thanks for the nice blog. It was very useful for me. I'm happy I found this blog. Thank you for sharing with us,I too always learn something new from your post. https://pook.co.zw/
xolabemo · 21 weeks and 6 days ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. https://pook.co.zw/
xolabemo · 21 weeks and 6 days ago
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog, I will keep visiting this blog very often. bahamas all inclusive resorts
xolabemo · 18 weeks and 5 days ago
Fantastic blog! Do you have any tips and hints for aspiring writers? I’m planning to start my own website soon but I’m a little lost on everything. Would you propose starting with a free platform like WordPress or go for a paid option? There are so many options out there that I’m completely overwhelmed .. Any suggestions? Many thanks! 3d website
xolabemo · 17 weeks and 4 days ago
Hello There. I found your blog using msn. This is an extremely well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. I’ll certainly comeback. First Aid At Work Course
xolabemo · 16 weeks and 3 days ago
Great content material and great layout. Your website deserves all of the positive feedback it’s been getting. cozumelall inclusive adults only resorts
xolabemo · 15 weeks and 2 days ago
I am unable to read articles online very often, but I’m glad I did today. This is very well written and your points are well-expressed. Please, don’t ever stop writing. cozumelall inclusive adults only resorts
xolabemo · 15 weeks and 2 days ago
Impressive web site, Distinguished feedback that I can tackle. I am moving forward and may apply to my current job as a pet sitter, which is very enjoyable, but I need to additional expand. Regards. caminhão de mudança df
xolabemo · 13 weeks and 2 days ago
Impressive web site, Distinguished feedback that I can tackle. I am moving forward and may apply to my current job as a pet sitter, which is very enjoyable, but I need to additional expand. Regards. caminhão de mudança df
xolabemo · 13 weeks and 2 days ago
nice post, keep up with this interesting work. It really is good to know that this topic is being covered also on this web site so cheers for taking time to discuss this! scalp micropigmentation
xolabemo · 13 weeks and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: