Hide

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.


Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

UpGuard checks and validates configurations for every major OS, network device, and cloud provider.
Hide

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:

Hide

News

May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!
Hide

Top Tags

Hide

Functions

Create A Continuous Yahoo! News Ticker For The Terminal

Terminal - Create A Continuous Yahoo! News Ticker For The Terminal
while true;do n="$(curl -s http://news.yahoo.com/rss/|sed 's/</\n/g'|grep "title>"|sed -e '/^\// d' -e 's/title>/---------- /g' -e '1,3d'|tr '\n' ' ')";for i in $(eval echo {0..${#n}});do echo -ne "\e[s\e[0;0H${n:$i:$COLUMNS}\e[u";sleep .15;done;done &
2012-11-17 23:56:17
User: SQUIIDUX
Functions: echo eval sleep
7
Create A Continuous Yahoo! News Ticker For The Terminal

This creates a permanent stock ticker in the terminal. it has scrolling action and refreshes when each cycle is done to get the latest news.

Alternatives

There are 2 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

Nice! You can avoid eval:

Replace

$(eval echo {0..${#n}})

with

$(seq 0 ${#n})
Comment by michelsberg 263 weeks and 1 day ago

i like it but eval is POSIX and seq is not, that is why i chose it

Comment by SQUIIDUX 263 weeks and 1 day ago

may I suggest the following

1. replace curl with wget

2. use awk for parsing

3. use a stop condition

while [ ! -e /tmp/nt_stop ];do n=$(wget -q -O - http://news.yahoo.com/rss/|awk 'BEGIN{FS="<item><title>"}{for(i=2;i<=NF;i++){sub(/<.*/," ",$i);printf("%s",$i)}}');for i in $(eval echo {0..${#n}});do echo -ne "\e[s\e[0;0H${n:$i:$((COLUMNS - 1))}\e[u";sleep .10;[ -e /tmp/nt_stop ] && break;done;done &

to stop it

touch /tmp/nt_stop;sleep .5;rm /tmp/nt_stop
Comment by ichbins 263 weeks ago

If the command is running in the background, you can just use the fg command to bring it forward and then CTRL+C to stop it or you can view the process when it gets forked and kill -9 $PID. this way there is no temp files.

Comment by SQUIIDUX 262 weeks and 6 days ago

http://www.michaelkors-handbags.in.net

http://www.canadagoosejacketssale.us.com

http://www.cheapraybans-sunglasses.us.com

http://www.michaelkorsoutletofficials.us.com

http://www.christian-louboutinoutlet.us.org

http://www.christianlouboutin.com.co

http://www.ralphlaurenpoloshirts.me.uk

http://www.lacosteoutlet.us.org

http://www.adidasshoes.us.org

http://www.coachfactoryoutletonlinestores.us.com

http://www.ralph-laurenpolooutlet.us.com

http://www.mont-blancpens.us.com

http://www.michaelkorsoutletclearancee.us.com

http://www.fitflopsaleclearance.us.com

http://www.polooutlet.name

http://www.coachfactoryoutletofficials.us.com

http://www.raybansunglassesformen.us.com

http://www.mbtshoesoutlets.us.com

http://www.oakley-sunglassesoutletonline.us.com

http://www.nikeshoes.com.co

http://www.cheapuggboots.name

http://www.cheapuggboots.org

http://www.raybansun-glasses.com.co

http://www.fredperry.org.uk

http://www.ralphlaurenpolo-uk.org.uk

http://www.valentinooutlet.in.net

http://www.polooutletralphlauren.us.com

http://www.oakleysunglasseswholesaler.us.com

http://www.montblancpensoutlet.com

http://www.ralphlauren-polo.me.uk

http://www.yeezyboost350-v2.us.com

http://www.mcmoutletonline.us

http://raybansunglasses.co-sunglasses.com

http://nikeshoes.nike-com.com

http://www.oakley-sunglassesclearance.us.com

http://www.truereligionjeanss.us.com

http://www.pandoraoutlets.us.com

http://www.montblancpens-outlet.us.com

http://www.lunetterayban.fr

http://www.airjordan4.us

http://www.canadagooseoutlet-store.com.co

http://www.adidasnmd-r1.us.com

http://www.truereligionjeans-sale.us.com

http://www.mlbjerseys.net

http://www.adidasyeezyshoes.name

http://www.poloralphlaurenfactorystore.us.com

http://www.cheapjordans.name

http://www.edhardyclothing.us.com

http://www.michaelkorsoutletclearancehandbags.us.com

http://www.polo-ralphlaurenuk.me.uk

http://www.fitflops-saleclearance.us

http://www.cheapmlb-jerseys.us

http://www.nikeshoesoutlet.us.com

http://polooutlet.amegov.com

http://www.katespadeshandbags.us

http://www.ralphlauren-outletuk.org.uk

http://www.canadagoose.name

http://www.ralph-laurenoutletuk.me.uk

http://www.ralphlaurenoutlets.org.uk

http://www.michaelkorsoutlet-online.in.net

http://www.fredperrypoloshirts.co.uk

http://www.kate-spadeoutlet.us.org

http://www.nike-shoes.us.com

http://www.truereligion-outletstore.us.com

http://www.polo-ralphlauren-pascher.fr

http://www.poloralphlauren-uk.me.uk

http://www.mbtshoescheap.us.com

http://www.pradaoutletstore.us

http://www.pradaoutlet-store.us.com

http://poloralphlauren.amegov.com

http://www.true-religionoutletstore.us.com

http://www.lebron-jamesshoes.us.com

http://www.cheapuggs.name

http://www.michaelkorsoutlet-clearance.org

http://www.oakleysunglasseswholesales.us.com

http://www.michaelkorsoutlet-clearances.us.com

http://adidasyeezyshoes.adidassale.net

http://www.pandorajewelry-outlet.us.com

http://www.katespadeoutlet-store.us.com

http://www.longchampoutlet.us.org

http://www.nikeoutlet.com.co

http://www.oakleysunglasseswholesalee.us.com

http://www.oakleysunglassescheaps.us.com

http://www.fredperryoutlet.us.com

http://www.longchampoutletofficial.us.com

http://www.coachfactory-outlet.eu.com

http://www.adidasoutlet.com.co

http://www.asicsrunningshoes.us.com

http://www.coach-outletonlineclearance.us.com

http://www.christianlouboutin-uk.org.uk

http://www.oakleysunglassesformen.us.com

http://www.nhljerseyss.us.com

http://cheapraybansunglasses.co-sunglasses.com

http://www.coachfactoryoutletmiami.us.com

http://www.coachoutletcoachoutletstore.us.com

http://www.adidasoutlet.us.org

http://www.cheapjordansfor-sale.us.com

http://www.michaelkorsoutletofficial.com

http://www.hermesbeltsoutlet.us.com

http://www.pandoraoutletstore.us.com

http://www.michaelkorsoutlet-clearance.us

http://www.ralphlauren-shirts.org.uk

http://www.ralphlaurenoutletonlinestore.us.com

http://www.ralphlaurenofficial.us.com

http://www.michael-korshandbags.in.net

http://www.michaelkorsoutletonlinestore.us.org

http://www.oakleysunglassesfactory.us.com

http://www.polooutlet.us.org

http://www.raybanssun-glasses.com.co

http://www.coachoutletonlinecoachfactoryoutlets.us.com

http://www.michaelkorssoutletclearance.us.com

http://www.poloralphlauren-uk.org.uk

http://nikeshoes.up-nike.com

http://www.poloralph-laurenuk.co.uk

http://www.michael-korsoutletstore.in.net

http://www.coachfactoryoutlet-coachoutlet.us.com

http://www.canadagoosejacketss.com.co

http://www.christian-louboutinshoes.us

http://www.coach-outletonlinecoachfactoryoutlet.us.com

http://www.cheapnfljerseys.eu.com

http://www.mlbjerseys-wholesale.us.com

http://www.adidasyeezy-shoes.us.com

http://www.nike-shoes.us.org

http://www.valentino-outlet.us.com

http://www.ralph-laurenpolo.us.org

http://www.raybansunglassesonsale90off.us.com

http://www.fitflopssaleclearance.name

http://www.coachoutletcoachfactoryoutlets.us.com

http://www.airjordan.us.org

http://www.canadagoose-outlets.com.co

http://raybansunglassesoutlet.co-sunglasses.com

http://www.uggoutlet.name

http://www.oakleysunglassesss.us.com

http://www.canadagooses.com.co

http://www.ralphlaurenshirts.me.uk

http://www.michaelkorsoutlet-clearance.com

http://www.cheapjordans-forsale.us.com

http://www.oakleysunglasseswholesaleonline.us.com

http://www.coachoutletonlinecoachfactoryoutlet.com.co

http://www.kate-spadeoutletstore.us.com

http://www.nbajerseyss.us.com

http://yeezyboost.adidassale.net

http://www.nikeoutletstorelocations.com

http://www.montblancpenss.com.co

http://www.pandorajewelrycharms.us.com

http://www.mulberryhandbagsuk.co.uk

http://www.hermesbirkins.us.com

http://www.coachoutlet-clearance.us.org

chenlili20170503

Comment by chenyingying 31 weeks and 4 days ago

HereWhether http://www.huaracherunpas-cher.fr/nike-air-huarache-blanc_41.html you are interested in a http://www.huaracherunpas-cher.fr/nike-air-huarache-blanche_153.html job, looking at starting a own family based http://www.huaracherunpas-cher.fr/nike-huarache-leopard_57.html business or simply continuously discussing http://www.huaracherunpas-cher.fr/nike-huarache-violet_54.html somebody http://www.huaracherunpas-cher.fr/nike-air-huarache-run_43.html else, this is a great the perfect time to http://www.huaracherunpas-cher.fr/nike-huarache-taille_49.html get started http://www.huaracherunpas-cher.fr/nike-huarache-boutique_147.html promoting and personalisation yourself.Companies have lengthy http://www.huaracherunpas-cher.fr/nike-huarache-free-run-2012_146.html acknowledged the need for http://www.huaracherunpas-cher.fr/nike-huarache-blanc_85.html making a reputation for their products plus products http://www.huaracherunpas-cher.fr/nike-air-huarache-bleu_167.html and services to line http://www.huaracherunpas-cher.fr/nike-huarache-1991_55.html independently aside http://www.huaracherunpas-cher.fr/nike-air-huarache-retro_70.html from their competitors. Todays rapidly transferring financial system, put http://www.huaracherunpas-cher.fr/nike-huarache-2_166.html together with our progressively http://www.huaracherunpas-cher.fr/air-huarache-noire_117.html more Web-driven marketing http://www.huaracherunpas-cher.fr/huarache-usa_100.html communications, allow it to become important for http://www.huaracherunpas-cher.fr/nike-huarache-light-og_115.html website visitors to continually http://www.huaracherunpas-cher.fr/air-max-huarache_39.html review, bring up http://www.huaracherunpas-cher.fr/nike-huarache-ultramarine_125.html to date along with advertise the http://www.huaracherunpas-cher.fr/nike-huarache-homme_141.html knowledge.OK, a person declare, I'm http://www.huaracherunpas-cher.fr/nike-huarache-toute-noir_154.html sure the key reason why Microsof company, The http://www.huaracherunpas-cher.fr/air-huarache-og_71.html apple company, Nike, Kelloggs, http://www.huaracherunpas-cher.fr/nike-huarache-3_108.html Campbells along with Nabisco product on http://www.huaracherunpas-cher.fr/air-huarache-noir_116.html their own. http://www.huaracherunpas-cher.fr/air-huarache-solde_40.html Im not a laptop, a shoe or http://www.huaracherunpas-cher.fr/chaussures-air-huarache_128.html maybe a can of soup.Well http://www.huaracherunpas-cher.fr/nike-air-huarache-run-pas-cher_98.html , just like these businesses, you http://www.huaracherunpas-cher.fr/nike-huarache-solde_94.html encounter competitiveness daily whether you understand http://www.huaracherunpas-cher.fr/boutique-nike-huarache_151.html it or http://www.huaracherunpas-cher.fr/nike-huarache_93.html otherwise not. Logos yourself is http://www.huaracherunpas-cher.fr/nikeair-huarache_88.html the real key to be able to standing http://www.huaracherunpas-cher.fr/acheter-huarache_84.html up for regardless of http://www.huaracherunpas-cher.fr/nike-air-flight-huarache-og_48.html whether you're providing a product or http://www.huaracherunpas-cher.fr/huarache-bleu_111.html service, a site http://www.huaracherunpas-cher.fr/nike-huarache-run-pas-cher_61.html as well as all by http://www.huaracherunpas-cher.fr/huarache-beige_106.html yourself.This overall economy causes it to http://www.huaracherunpas-cher.fr/huarache-og_183.html become essential for you to http://www.huaracherunpas-cher.fr/nike-air-flight-huarache_102.html help alter the way you http://www.huaracherunpas-cher.fr/nike-air-max-huarache-hybrid_121.html watch in addition to market place http://www.huaracherunpas-cher.fr/nike-huarache-femme-pas-cher_140.html yourself. The reason? If http://www.huaracherunpas-cher.fr/huarache-run_132.html you are after for a http://www.huaracherunpas-cher.fr/chaussure-nike-air-huarache_76.html job, you are on to know http://www.huaracherunpas-cher.fr/huarache-4_118.html what number of http://www.huaracherunpas-cher.fr/huarache-bordeaux_53.html candidates, most of to http://www.huaracherunpas-cher.fr/huarache-noir-femme_60.html whom might be endorsing by themselves as http://www.huaracherunpas-cher.fr/nike-huarache-light-ultramarine_171.html the a lot of http://www.huaracherunpas-cher.fr/nike-huarache-femmes_182.html certified.Even for those who have http://www.huaracherunpas-cher.fr/nike-huarache-marron_165.html an occupation it's really crucial http://www.huaracherunpas-cher.fr/nike-air-huarache-light-pas-cher_44.html that you model on your own, simply http://www.huaracherunpas-cher.fr/nike-huarache-noir-et-rose_58.html because inside an unsound http://www.huaracherunpas-cher.fr/nike-huarache-jd_46.html economy, an individual http://www.huaracherunpas-cher.fr/nike-air-huarache-prix_120.html dont find out what may http://www.huaracherunpas-cher.fr/nike-air-force-1-huarache_113.html occur sometime soon.Plenty connected with staff members http://www.huaracherunpas-cher.fr/basket-nike-huarache_45.html who assumed they http://www.huaracherunpas-cher.fr/huarache-enfant_62.html can expend their jobs using manufacturers like General http://www.huaracherunpas-cher.fr/nike-id-huarache_158.html Motors now wind up http://www.huaracherunpas-cher.fr/huarache-light-og_105.html in work market http://www.huaracherunpas-cher.fr/huarache-5_74.html place that is definitely enormously totally http://www.huaracherunpas-cher.fr/air-flight-huarache_68.html different from those people http://www.huaracherunpas-cher.fr/free-huarache_103.html encountered by preceding a long time. http://www.huaracherunpas-cher.fr/huarache-nike-chaussures_131.html Online jobs providers including http://www.huaracherunpas-cher.fr/nike-huarache-agassi_133.html Creature.internet, Without a doubt.org along http://www.huaracherunpas-cher.fr/chaussures-huarache_56.html with CareerBuilder.world wide web employ http://www.huaracherunpas-cher.fr/nike-air-huarache-og-retro_101.html a way take both http://www.huaracherunpas-cher.fr/nike-air-huarache-taille_172.html equally job hunters and employers. Companies which are generally http://www.huaracherunpas-cher.fr/nike-huarache-premium_126.html employing are accustomed to getting http://www.huaracherunpas-cher.fr/huarache-montante_179.html inundated having http://www.huaracherunpas-cher.fr/nike-air-huarache-pas-chere_161.html continues.Many available work opportunities, no matter whether http://www.huaracherunpas-cher.fr/huarache-air-max_163.html fulltime, freelance or http://www.huaracherunpas-cher.fr/nike-huarache-magenta_51.html maybe contract, will be under this http://www.huaracherunpas-cher.fr/nike-huarache-beige_91.html radar instead of uploaded. http://www.huaracherunpas-cher.fr/nike-air-huarache-light-ultramarine_64.html Making it more vital than before so http://www.huaracherunpas-cher.fr/huarache-chaussures_95.html that you http://www.huaracherunpas-cher.fr/chaussure-air-huarache_180.html can system. There have not been more http://www.huaracherunpas-cher.fr/air-huarache-homme_67.html instruments as well as providers, http://www.huaracherunpas-cher.fr/nike-huarache-chaussures_129.html the majority of them no cost, to http://www.huaracherunpas-cher.fr/air-huarache-light_139.html really get http://www.huaracherunpas-cher.fr/huarache-noir-et-blanc_96.html your label along with references around.Here are http://www.huaracherunpas-cher.fr/air-nike-huarache_107.html a couple of strategies for http://www.huaracherunpas-cher.fr/basket-huarache_63.html developing along with http://www.huaracherunpas-cher.fr/air-huarache-grise_142.html marketing and advertising a person's http://www.huaracherunpas-cher.fr/huarache-nike-noir_149.html product:Use on-line social network: Beverly http://www.huaracherunpas-cher.fr/nike-air-zoom-huarache_89.html Shepard published a reward http://www.huaracherunpas-cher.fr/nike-huarache-free-light_134.html of as much as $6,1000 with http://www.huaracherunpas-cher.fr/huarache-noir_86.html LinkedIn to get assist clinching a different http://www.huaracherunpas-cher.fr/nike-huarache-pour-femme_155.html occupation after a http://www.huaracherunpas-cher.fr/nike-huarache-id_164.html paper eliminated the http://www.huaracherunpas-cher.fr/nike-huarache-safari_52.html girl situation because promoting director. The woman was http://www.huaracherunpas-cher.fr/air-huarache-nike_87.html bombarded by using leads http://www.huaracherunpas-cher.fr/nike-air-huarache-chaussures_80.html and also promotion coming from your ex http://www.huaracherunpas-cher.fr/huarache-light_50.html publish on LinkedIn, http://www.huaracherunpas-cher.fr/huarache-og-2017_143.html which in turn reaches http://www.huaracherunpas-cher.fr/huarache-acheter_83.html approximately Forty five million people today. http://www.huaracherunpas-cher.fr/nike-huarache-paris_69.html Ones Twitter good friends listing currently http://www.huaracherunpas-cher.fr/nike-huarache-run_72.html might contain the http://www.huaracherunpas-cher.fr/nike-huarache-gris_59.html keys to innovative chances a person http://www.huaracherunpas-cher.fr/nike-air-huarache-light-ultramarine-og_75.html havent thought of. A hugh achieve http://www.huaracherunpas-cher.fr/nike-huarache-rouge_81.html involving online community makes http://www.huaracherunpas-cher.fr/huarache-nike-pas-cher_79.html it a necessary tool http://www.huaracherunpas-cher.fr/nike-huarache-noir-et-bleu_130.html with regard to extending the marketing attain. http://www.huaracherunpas-cher.fr/nike-air-huarache-run-chaussures_174.html Position your self http://www.huaracherunpas-cher.fr/nike-air-huarache-mid_78.html as an specialist: Your hobbies, capabilities, capabilities, education http://www.huaracherunpas-cher.fr/huarache-vintage_42.html , interests plus http://www.huaracherunpas-cher.fr/nike-air-huarache-1991_65.html views are unique. You will have in-depth http://www.huaracherunpas-cher.fr/nike-huarache-free-run-pas-cher_156.html know-how, experience or simply a http://www.huaracherunpas-cher.fr/ enthusiastic affinity for an individual http://www.huaracherunpas-cher.fr/nouvelle-nike-huarache_82.html space, nevertheless have http://www.huaracherunpas-cher.fr/huarache-nike-blanche_127.html not pondered using the Net http://www.huaracherunpas-cher.fr/nike-air-huarache-solde_181.html to share it. Absolutely free press companies http://www.huaracherunpas-cher.fr/achat-nike-huarache_137.html for example enable you to do http://www.huaracherunpas-cher.fr/huarache-noir-et-rose_109.html your individual pr http://www.huaracherunpas-cher.fr/nike-air-huarache-rouge_47.html and find worthwhile publicity on tv. http://www.huaracherunpas-cher.fr/nike-air-huarache-og_162.html I actually designed PitchRate to get http://www.huaracherunpas-cher.fr/huarache-leopard_77.html in touch journalists using specialist http://www.huaracherunpas-cher.fr/nike-air-huarache-original_144.html options. http://www.huaracherunpas-cher.fr/huarache-instagram_169.html Register and you could be http://www.huaracherunpas-cher.fr/nike-air-huarache-2_92.html approached plus motivated to converse just http://www.huaracherunpas-cher.fr/huarrache-blanche_135.html as one guru as well as write http://www.huaracherunpas-cher.fr/nike-air-huarache-safari_73.html about your http://www.huaracherunpas-cher.fr/nike-air-huarache-90_110.html tale mainly because it concerns a particular http://www.huaracherunpas-cher.fr/nike-huarache-fille_148.html theme or even craze in news bulletins. http://www.huaracherunpas-cher.fr/huarache-femmes_170.html Its one other way http://www.huaracherunpas-cher.fr/air-huarache-blanc_123.html to tell http://www.huaracherunpas-cher.fr/nike-huarache-2013_159.html others, manufacturer your self, and be http://www.huaracherunpas-cher.fr/nike-huarache-prix_66.html a media professional.Network via organizations: Although you may http://www.huaracherunpas-cher.fr/nike-air-huarache-turquoise_160.html have http://www.huaracherunpas-cher.fr/air-huarache-run_157.html not nevertheless designed the progress to http://www.huaracherunpas-cher.fr/nike-huarache-usa_114.html an alternative employment, signing up for http://www.huaracherunpas-cher.fr/huarache-free-run_145.html as well as becoming http://www.huaracherunpas-cher.fr/huarache-2017_99.html productive in a very http://www.huaracherunpas-cher.fr/nike-air-huarache-noir_97.html skilled connections is often a proven http://www.huaracherunpas-cher.fr/air-huarache-paris_138.html journey for advertising your self. Assembly other http://www.huaracherunpas-cher.fr/huarache-chaussure_122.html individuals working in http://www.huaracherunpas-cher.fr/air-huarache-femme_90.html the exact same profession http://www.huaracherunpas-cher.fr/nike-air-huarache-beige_112.html will aid you to get http://www.huaracherunpas-cher.fr/nike-air-huarache-homme_150.html up thus far within the newest movements http://www.huaracherunpas-cher.fr/nike-air-huarache-light_168.html impacting on which http://www.huaracherunpas-cher.fr/nike-air-force-huarache_124.html company, and produce systems that could bring http://www.huaracherunpas-cher.fr/chaussure-huarache-nike_173.html about long term prospects. If you are http://www.huaracherunpas-cher.fr/nike-air-huarache-international_104.html looking for a http://www.huaracherunpas-cher.fr/chaussures-huarache-nike_152.html job nowadays an individual cant relax on your continue. Just what victories your day is actually creativity, tolerance as well as commitment in promoting on your own. There've never recently been extra applications along with a better time to do it.

Comment by scott154 14 weeks and 5 days ago

Your point of view

You must be signed in to comment.