Simple addicting bash game.

count="1" ; while true ; do read next ; if [[ "$next" = "$last" ]] ; then count=$(($count+1)) ; echo "$count" ; else count="1" ; echo $count ; fi ; last="$next" ; done
Really bored during class so I made this... Basically, you hold period (or whatever) and hit enter after a second and you need to make the next line of periods the same length as the previous line... My record was 5 lines of the same length. It's best if you do it one handed with your pointer on period and ring on enter.

9
By: dabom
2010-03-30 04:02:29

1 Alternatives + Submit Alt

What Others Think

if you press enter without entering any character, you can be champion :)
alperyilmaz · 599 weeks and 1 day ago
Great, now my terminal looks like this: .............................. 1 ............................. 1 ............................. 2 ............................. 3 ............................. 4 ............................. 5 ............................. 6 ............................ And my coworkers think I'm an idiot
d34dh0r53 · 599 weeks and 1 day ago
That's just awesome! :)
and3k · 599 weeks and 1 day ago
Damn you beat my record :D Glad to see people are liking it! Here is a slight modification in which you try to make a line that is one character longer than the previous. count="1" ; while true ; do read next ; if [[ "$(echo -n $next | wc -c)" = "$(($(echo -n $last | wc -c)+1))" ]] ; then count=$(($count+1)) ; echo "$count" ; else count="1" ; echo $count ; fi ; last="$next" ; done Or here is the opposite to that where you have to make a line that is one character shorter than the previous (gets tricky near the end.) count="1" ; while true ; do read next ; if [[ "$(echo -n $next | wc -c)" = "$(($(echo -n $last | wc -c)-1))" ]] ; then count=$(($count+1)) ; echo "$count" ; else count="1" ; echo $count ; fi ; last="$next" ; done
dabom · 599 weeks and 1 day ago
I've never saw such a game before :) You could sell it and be a millionaire :)
ivanatora · 599 weeks and 1 day ago
very cool. got 6 lines as well :) thanks for sharing, now all those lectures get bearable again.
simu · 599 weeks and 1 day ago
:-) thnx....
nbk1971 · 599 weeks and 1 day ago
the same (except counter starts at 0) in a shorter format: while $8;do read n;[ $n = "$l" ]&&c=$(($c+1))||c=0;echo $c;l=$n;done
florian · 599 weeks ago
Wow, you certainly shortened mine. Now that I think about it, the character count is pretty pointless for this revision of the game and speeds things up by 0.02s so I have updated the main script to not bother with character counting like yours. One thing though, the reason I set the count to one was to count the number of lines of lines that were the same. I found a 10x faster way of getting the character count and I am updating the other versions of the script below. Increasing: count="1" ; while true ; do read next ; if [[ "${#next}" = "$((${#last} + 1))" ]] ; then count=$(($count+1)) ; echo "$count" ; else count="1" ; echo $count ; fi ; last="$next" ; done Decreasing: count="1" ; while true ; do read next ; if [[ "${#next}" = "$((${#last} - 1))" ]] ; then count=$(($count+1)) ; echo "$count" ; else count="1" ; echo $count ; fi ; last="$next" ; done
dabom · 599 weeks ago
W00T!!1 I got 5!
benjabean1 · 524 weeks and 4 days ago
scream, www.swarovski-crystal.us.com or www.babyliss-pro.us.com enjoy www.levisjeans.com.co the www.juicycoutureoutlet.net.co cicadas www.tomsoutlet-online.com flap www.swarovskijewelry.com.co its www.mk-outlet.us.com wings www.mcmhandbags.com.co when www.converse.net.co you www.burberrys-outlet.co.uk bring www.tommy-hilfiger-online-shop.de the www.michaeljordan.com.de cool wind; www.new-balance-schuhe.de when www.converse-shoes.net passing www.uggsoutlet.com.co Hasuike www.christianlouboutinshoes.jp.net also www.tocoachoutlet.com puffed breath www.tommy-hilfiger.com.de goods products that www.nike.org.es Lotus www.nike-air-max.ca aroma; www.guccishoes.com.co hours because ignorance www.tommy-hilfigeroutlet.com has www.tiffany-andco.com.au been www.hermes-outlet.com.co poked hornet's nest www.pumashoes.in.net and www.true-religion.com.co stung www.harrods-london.co.uk his www.coachblackfriday.com face www.outlet-burberry.net.co was www.chiflatiron.net.co bruised. www.bottegaveneta-bagsoutlet.com Dig www.toms-outlets.us.com once, www.louis-vuitton-taschen.com.de because www.coach-factory.in.net "small www.nikerosherun.us insects" www.raybans.us.org (Sparrow) www.louboutin.jp.net and www.rosherun.org.uk took www.yoga-pants.net.co out www.tommy-hilfiger.co.nl a www.timberlandshoes.net.co "snake" www.nikefree5.net (Snake) www.lauren-ralph.co.uk scared www.tomsoutletonline.net to www.guccihandbags.net.co fall www.burberryoutlet-sale.in.net from www.uggboots.net.co the www.ralphlaurenoutletonline.in.net wall. www.pandora-charms.org.uk Fortunately, www.tommyhilfigeroutlet.in.net nothing www.nike-air-max.com.de serious. www.guccioutlet-sale.in.net Leisure time, www.air-max.com.de will www.nike-rosherun.nl collect www.nikefree-run.org.uk some www.beatsbydrdre.co.com cigarette www.swarovski-online-shop.de paper www.coachoutletstore.net.co folded www.ugg-boots.ca triangle, www.ugg-uggboots.net and www.oakleys-sunglasses.us.com partners www.rosheruns.us to www.truereligion-outlet.us.org play; (the www.barbour-factory.com triangle www.nikestore.us on www.newoutletonlinemall.com the www.katespadeoutlet.gb.net ground www.toryburchoutlet-sale.us.com and put www.tiffany-andco.us.com his www.rolexwatchesforsale.us.com hand www.timberlands-paschere.fr on www.michael-kors.com.co the www.longchamp-handbagsoutlet.us.com ground www.ralphlaurenepolo.com quick www.converse-shoesoutlet.com photo www.christianlouboutinshoesoutlet.org shoot www.toms-shoes.net.co the www.michaelkors-uk.org.uk other www.burberry-handbagsoutlet.com.co side www.nike-air-force.de of www.northfaceoutlet.com.co the nike.shoesoutlet.us.com triangle www.thomas-sabo.com.de is www.ralphlaurenpolos.in.net the www.thejoreseproject.com triangle www.michael-kors-handbags.us.com that www.bcbg-max-azria.ca turned www.swarovski--uk.me.uk their www.supra-shoes.org a); www.ferragamoshoes.in.net and www.designerhandbagsoutlet.net.co also www.michaelkorsoutlet.ar.com than www.replicarolex-watches.us.com own www.rayban-sunglasses.us.org older www.rayban.org.es brother www.hollister-clothing.in.net and www.montres-pascher.fr sister www.montblanc--pens.in.net were www.oakley-outletstore.in.net led www.louis--vuitton.org.uk to www.longchamp.com.de a www.coach-outletonline.net.co wide www.fashionclothes.us.com flat www.converse.com.de on www.giuseppe-zanotti.net the www.burberry-outlet.net.co grass www.coach-factoryoutlet.net.co or www.louisvuitton-outlets.us doing www.asics-outlet.us.com "of www.adidas-superstar.nl chicken" www.michaelkors-outlet-online.com.co or www.pumaonline-shop.de "kill www.nike-shoes-canada.ca the www.cheapuggboots.us.com lamb" www.soccer-shoesoutlet.com of www.nike--freerun.co.uk the www.prada-shoes.com.co game, www.nike-airmaxinc.co.uk before www.abercrombie-fitchsale.com the www.bebeclothing.in.net election www.nikestore.com.de when www.coach-purseoutlet.net one www.longchamp.com.co eagle, www.instylers.us.com then www.toms--outlet.com.co tall www.lululemoncanada.ca in www.barbour-jacketsoutlet.com front when www.cheap-michaelkors.com hens www.basketballshoes.com.co , www.adidas-superstar.de when www.chanelhandbags.net.in the www.nikefree-run.net rest www.toryburch-sandals.in.net of the www.adidasshoes.top chicken, www.nike-roshe-run.de the www.pulseras-pandora.com.es eagle www.toms-shoes.com.co chasing www.burberryoutlet2016.us.com shot www.nike-air-max.com.se at www.louis-vuittonoutletcanada.ca the www.oakley-sunglasses.mex.com back www.uggboots.com.de of www.nike-air-max.us the www.raybans-sunglassesoutlet.in.net chick, www.poloralphlaurenoutlet.net.co hen www.longchamps.us.com with www.eyeglassframes.in.net open www.tiffanyand-co.net.co arms www.bcbg-dresses.com to www.reebok.com.de protect www.airmax-2015.org chickens, www.rolexwatches-canada.ca smart www.ralphlauren-polos.com.co dodge www.mkoutletonline.us.com to www.new-balance.ca keep www.michael-korshandbags.org.uk eagle www.ralph-laurenoutlet.ca patting. www.burberry-handbags2016.in.net Or a www.louisvuitton-outlet.com.co dozen www.pandorajewelry.top people sitting www.coachoutlet-online.com.co in www.replica-handbags.net.co a airhuarache.shoesoutlet.us.com circle, www.maccosmetics.net.co do www.coachhandbags2016.us.com a www.polooutlets-store.com do www.salomon-schuhe.com.de Diushou Juan www.nikeair--max.fr game: www.mcm-handbags.org the www.adidas-schuhe-online.de hands www.handbagsoutlet.net.co of www.vans-shoes.co.uk only www.michael-kors-canada-outlet.ca one www.michaelkorsoutlet-online.ar.com person www.hermesbags.jp.net to www.beats-by-dre.com.co take www.cheap-oakleyglasses.us.com the www.longchamphandbagsoutlet.net handkerchief www.newbalance-shoes.org out www.ralphslauren-outlet.co.uk of www.wedding--dresses.ca his www.mmoncler-outlet.com mouth www.nike-skor.com.se in www.tnf-jackets.us.com a www.the-northface.com.co circle www.air-huarache.co.uk singing www.scarpe-hoganoutlets.it Diushou www.ralphlaurenoutletonline.us.org Juan www.oakley-sunglasses-canada.ca songs, www.michael-kors-taschen.com.de danced www.tiffany-und-co.de around www.coco-chanels.us.com the www.gucci-shoes.net circle www.kate-spade.in.net turning www.eyeglassesonline.us.com quietly www.salvatoreferragamo.in.net throw www.asicsgels.de the www.burberrybags-outlet.com handkerchief www.hollister.us.org in the www.oakleys-glasses.us.com back www.christianlouboutin.org.uk of www.coach-factoryyoutletonline.net a www.michael-kors.net.co person. www.horloges-rolex.nl Then www.cheap-baseballbats.net run www.christian-louboutin-shoes.ca around www.michaelkors.so in www.swarovski-australia.com.au circles. www.juicycouture.com.co If www.cheap-raybans.com you www.tommyhilfiger.net.co have www.tomsshoes-outlet.us.com a www.ferragamo.com.co lap www.the-north-face.ca behind www.uggsaustralia.com.co the www.oakleysunglass-outlet.net handkerchief www.chanel-bags.com.co patting, www.toms-shoesoutlet.net this www.woolrich-clearance.com people www.nikeshoesoutlet.org.uk have www.ray--ban.ca not found www.cheap-jordans.net the www.jordanrelease-dates.us.com person www.guccishoes.in.net you www.nike-schoenen.co.nl want www.the-northfacejackets.us.com to www.adidas--canada.ca give www.michaelkors.co.nl a performance www.oakleyoutlet.ar.com for www.prada.com.de everyone; www.omegarelojes.es a www.michael-kors-australia.com.au joke, sing www.the-northface.net.co songs, or www.timberlandbootsoutlet.us.com back www.ghd-hairstraightener.net poem. www.longchampoutlet.com.co Then www.hermesbirkin-bag.net began www.canada-goosesjackets.us.com Diushou www.rolex-watches.us.com Juan www.pandorajewellery.com.au by www.truereligionjeans.net.co him www.chi-flatiron.us.com or www.nike-huarache.nl her. www.marcjacobs.us.com If www.ralphlauren-polos.co.uk this www.celine-bags.org is www.airhuarache.co.uk discovered immediately www.ghdhair-straighteners.co.uk took www.retro-jordans.com the www.gucci-outletstore.com handkerchief www.abercrombie-hollister.nl catch www.zxcoachoutlet.com Diushou Juan www.nike-tnrequinpascher.fr people, www.ralph-laurens.org.uk that www.jimmy-choos.com Diushou www.ralphlaurenoutlet-online.us.com Juan www.pradaoutlet.com.co will www.michaelkors.com.se continue www.soft-ballbats.com to www.adidas.org.es lose, www.ray-ban-outlet.us.com someone who www.weddingdressesuk.org.uk can www.ray-banocchiali.it back www.beatsbydre.com.co into www.pandora-charms-canada.ca place; www.uhren-shop.com.de catch, and airmax.misblackfriday.com throw www.rolex-watch.me.uk this www.cheapoakley-sunglasses.in.net man airmax.shoesoutlet.us.com who www.abercrombie-kids.us.com has www.nike-free-run.de sat www.beats-headphone.com.co on www.nfl-jersey.us.com the www.abercrombie-fitchs.us.com bit www.oakleysunglasses-cheap.in.net when this www.hogan.com.de man www.nikefactory.org will www.lululemon-australia.com.au be www.rayban-sunglassesoutlet.co.uk punished www.louisvuitton.so performances. We www.iphone-cases.net.co will www.pandora.com.de play www.ralphlaurenoutlet.us.com along www.abercrombie-and-fitch.us.com with www.hollisteronlineshop.com.de a www.calvin-kleins.us.com dozen www.ugg-bootsclearance.com "Stars www.oakley.org.es over www.ralph-lauren.com.au the www.tommy-hilfiger-canada.ca month www.guccishoes-uk.co.uk child" www.burberry-outletstore.net or www.louis-vuitton-australia.com.au "cat drilled www.louisvuitton.jp.net 72 www.jordanretro.org holes" www.burberryonlineshop.de game. www.christian-louboutinshoes.com.co (Read www.vans-shoes.net the www.rayban-wayfarer.in.net article www.michaelkorsbags.us.org Network: www.nike-schuhe.com.de www.sanwen.net)Also www.mizuno-running.net I www.newbalance-outlet.org remember www.edhardy.us.org one www.insanity-workout.us.com summer, supra.shoesoutlet.us.com that www.oakley--sunglasses.com.au the www.moncler-outlet.us.org acquisition www.pradahandbags.net.co of www.nike-shoesoutlet.us.com medicinal www.cheaprayban.com.co city www.airjordans.us recovered www.tory-burchshoesoutlet.net cicada www.truereligion-outlet.com.co skin www.lululemonoutlet.gb.net (medical www.tiffany-jewelry.net term www.nike-air-max.com.au called www.valentino-shoesoutlet.us.com cicada), www.thenorthface.com.de catty www.replica-watches.com.co two www.polos-ralphlauren.us.com five. So www.omega-watches.us.com every www.vans-schuhe.com.de day, together uggaustralia.misblackfriday.com with www.michael-kors-outlet-online.us.org my www.oakley.com.de brothers www.polo-outlets.com.co holding www.newbalance.com.es bamboo, www.hollister-abercrombie.com.se Dianzhe www.airmax-90.org plastic www.christian--louboutin.in.net bags, and www.designer-handbagsoutlet.us.com from www.jordan-shoes.com.co the www.ugg-boots-australia.com.au village www.cheapjerseys.com.co in www.louis-vuittonblackfriday.com the www.gucci-taschen-outlet.de woods to www.toryburchsale.com.co find www.louisvuittons.com.co a www.marc-jacobs.us.com tree www.nikeskos.dk cicada www.soccer-shoes.us.com skin, www.hollisters-canada.ca after www.burberry2016.co.uk the www.ralphs-lauren.co.uk end www.yoga-pants.ca of www.nikeair-max.es the www.ralphlaurenonlineshop.de summer, we www.abercrombieand-fitch.ca harvest www.nike-maxfr.com relatively www.cheapjerseys.us.org big, www.kate-spade.gb.net full www.cheapshoes.com.co harvest www.canadagooses-2016.com four www.ugg-boots.us.org pounds, www.bottega-veneta.us.com to www.ugg-australia.com.de buy www.cheapoakley-sunglasses.com ten www.christianlouboutinoutlet.net.co dollars. www.michaelkorsoutletonline-sale.us.com The www.uggs.in.net next www.michael-kors.com.es summer we www.polo-ralph-lauren.de look for www.p90xworkout.us.com a www.prada-handbags.com.co summer, more www.cheapmichaelkors.us.org than www.maccosmetics.gr.com the www.mcmsworldwide.com first www.mcm-bags.in.net year www.hollisterclothingstore.org looking www.ray-bansunglasses.net for even www.giuseppezanotti.com.co more, www.coachoutletstore-online.com.co I www.uggs.co.nl did www.coco-chanel.com.de not www.adidas.com.se expect www.rayban.com.de there www.burberry-outletonlinesale.in.net to www.michael-kors-outlet.us.org happily www.jimmy-chooshoes.com after www.oakleyoutlet-online.us.com being www.thenorthfacejackets.net.co told www.nikemercurial.in.net not www.longchamp-bags.us.com recovered. www.tiffanyandco-canada.ca Cicada www.burberrys-outlet2016.com got www.uggs-onsale.net hard www.burberryoutlet-canada.ca skin, www.nike-roshe-run.com.es back www.thomas-sabos.org.uk at www.rayban.co.nl home www.thenorth-faces.co.uk after www.mcmbags.net shuffling, www.cheap-nike-shoes.net and www.michael--kors.us.com www.swarovskicanada.ca
zyf543 · 284 weeks and 4 days ago
This is a cool game and you created it very cool. But still, I prefer gambling, especially online casinos. For me, this area is interesting and profitable. The main thing is to choose a reliable casino and you can do it through reviews at https://casinoscanada.reviews/en/canadian-dollar-casinos/. Here are reviews of the best casinos with the Canadian dollar, which offer the best conditions and nice bonuses. Reviews are useful to me because they help me choose a reliable casino. It would be cool if you could repeat such a gamble, it would be incredible.
Glairist · 59 weeks and 6 days ago
This is a cool game and you created it very cool. But still, I prefer gambling, especially online casinos. For me, this area is interesting and profitable. The main thing is to choose a reliable casino and you can do it through reviews at https://casinoscanada.reviews/en/canadian-dollar-casinos/. Here are reviews of the best casinos with the Canadian dollar, which offer the best conditions and nice bonuses. Reviews are useful to me because they help me choose a reliable casino. It would be cool if you could repeat such a gamble, it would be incredible.
Glairist · 59 weeks and 6 days ago
Shouldn't something be said about I share with you my find? I draw out from the dull https://newcasinos-za.com/ money on-the-betting business - a reasonably made article. where you can choo platfrom for betting, I just read this article and began playing at Duckdice online club for bitcoins. This is truly helpful, particularly I like the way that the cost of bitcoins increments and shockingly prior to trading for dollars, I increment my multiple times.
JeremyYang · 24 weeks and 1 day ago
Shouldn't something be said about I share with you my find? I draw out from the dull https://newcasinos-za.com/ money on-the-betting business - a reasonably made article. where you can choo platfrom for betting, I just read this article and began playing at Duckdice online club for bitcoins. This is truly helpful, particularly I like the way that the cost of bitcoins increments and shockingly prior to trading for dollars, I increment my multiple times.
JeremyYang · 24 weeks and 1 day ago
Scientists believe that recording their experiences, you release the brain from them - and less nervous why not try this out. In the article we will try to find out how to stop bothering everything in the world. Evolutionary psychologists love to say that a tribe that did not take care of getting enough fish for winter, does not suffer until spring. But anxiety can escape from control, as in case of anxious disorders that are 18% of Americans and 7% of people around the world. They lead to such a strong lunch about life that simply interfere with living.
amadoaurelio · 21 weeks and 6 days ago
Thanks for sharing very useful information! I also would like to recommend the site with games betsofa .
Chris_1185 · 2 weeks and 4 days 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: