[{"data":1,"prerenderedAt":196},["ShallowReactive",2],{"project-6888365":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":35,"aspects":36,"strip":39,"post_text":41,"what":42,"said":62,"maker_in_thread":116,"shape":124,"grid":128,"attempts":157,"same_week":158,"maker_shows":117,"maker_hidden":188,"reader_version":189,"card":190},"6888365","when","New unix utility \"when\"","title","Show HN: New unix utility \"when\"","https:\u002F\u002Fgithub.com\u002Fapgwoz\u002Fwhen","github.com","apgwoz",1386778567,2013,20,13,995,1739,58,"shown","dev_tools","command line utility","cli",[24,25,26,27,28],"unix utility","shell command retry","until loop","bash","watch command","mixed",-0.235,{"positive":32,"neutral":33,"mixed":34,"critical":33},1,3,0,7,{"idea":37,"docs":38},{"positive":32,"critical":33},{"positive":34,"critical":34},[34,40,32,33,32,33,34,33,34,34,34,32,34],5,null,{"problem":43,"audience":41,"pricing":41,"motivation":53,"time_to_build":41,"stack":60,"openness":61,"stage":61,"team_size":61},{"value":44,"source":45,"evidence":46},"Repeating a shell command until it succeeds, e.g. waiting for ssh to come up","maker",[47,50],{"id":48,"by":11,"text":49},"6888378","I've so far only tested this on OS X, and have mostly used it with the `-t` mode to have it notify me (via \"say\") when ssh succeeds on a CloudFormation spawned AWS instance.",{"id":51,"by":11,"text":52},"6888826","Exactly. But, see the -t flag, which is the real reason I wrote it. -t is a non-trivial script (if it's even possible in shell). It defaults to the until behavior because it's…",{"value":54,"source":45,"evidence":55},"Wanted a -t mode that is hard to write in shell",[56,57],{"id":51,"by":11,"text":52},{"id":58,"by":11,"text":59},"6888797","Yes. See the -t flag. That's the reason I wrote it.",[],"unknown",{"praise":63,"objections":72,"requests":88,"questions":96,"alternatives":102},[64],{"value":65,"source":66,"evidence":67},"Useful time saver over ad hoc shell one-liners","commenter",[68],{"id":69,"by":70,"text":71},"6888806","laumars","This could be quite handy as need to do this sort of thing surprisingly often and usually resort to a shell script one-liner like this: ``` while true; do echo \"hello world\";…",[73],{"value":74,"source":66,"evidence":75},"Equivalent to a bash while\u002Funtil loop or watch; unclear why it is needed",[76,80,84],{"id":77,"by":78,"text":79},"6888659","lipanski","What's the difference between this and the bash '&&' operator? Except for the timebomb flag, I don't really see any difference. Please correct me if I got this wrong. The '&&'…",{"id":81,"by":82,"text":83},"6888630","chingjun","What is the difference between this and 'while true; do cmd1 && cmd2; sleep 1; done'",{"id":85,"by":86,"text":87},"6888640","mphillips34","watch -n 1 foo && echo \"why does this exist?\"",[89],{"value":90,"source":66,"evidence":91},"More examples of the -t flag",[92],{"id":93,"by":94,"text":95},"6900711","sciurus","Could you give some more examples of how you use `-t` ?",[97],{"value":98,"source":66,"evidence":99},"What is the difference from && and until loops",[100,101],{"id":77,"by":78,"text":79},{"id":81,"by":82,"text":83},[103,108],{"value":104,"source":66,"evidence":105},"watch",[106,107],{"id":69,"by":70,"text":71},{"id":85,"by":86,"text":87},{"value":109,"source":66,"evidence":110},"bash while\u002Funtil loops with && or sleep",[111,112],{"id":81,"by":82,"text":83},{"id":113,"by":114,"text":115},"6888793","mooism2","It looks to me more like ``` until cmd1 ; do sleep 1 ; done ; cmd2 ```",{"comments":117,"answered":32,"key":118},4,[119,120,121],{"id":48,"text":49},{"id":51,"text":52},{"id":122,"text":123},"6888831","I struggled with a name. This morning in the shower, I liked \"trip\" but, I'm not sure I'll change it--certainly not because of homebrew.",{"commenters":125,"max_depth":117,"maker_replies":117,"first_comment_mins":126,"lifespan_hours":127},10,2,47,[129,131,133,135,139,140,141,143,145,149,153,155,156],[48,34,34,130,11,32],"project\u002Fneutral\u002Fnone",[69,32,40,132,70,34],"project\u002Fpositive\u002Fidea",[77,126,32,134,78,34],"project\u002Fcritical\u002Fidea",[136,126,33,137,138,34],"6888744","project\u002Fneutral\u002Fidea","bichiliad",[81,33,32,134,82,34],[113,33,33,137,114,34],[51,33,34,142,11,32],"maker\u002Fneutral\u002Fidea",[93,33,33,144,94,34],"maker\u002Fneutral\u002Fdocs",[146,33,34,147,148,34],"6888883","commenter\u002Fneutral\u002Fidea","d_theorist",[150,117,34,151,152,34],"6888626","other\u002Fneutral\u002Fnone","apetresc",[122,117,34,154,11,32],"maker\u002Fneutral\u002Fnone",[85,40,32,134,86,34],[58,40,34,142,11,32],[],[159,164,169,174,178,183],{"id":160,"name":161,"points":162,"category":163},"6864584","bestmedicareprice",488,"data",{"id":165,"name":166,"points":167,"category":168},"6878565","Craft",287,"games",{"id":170,"name":171,"points":172,"category":173},"6886834","tyto",179,"productivity",{"id":175,"name":176,"points":177,"category":173},"6858373","Heyday",139,{"id":179,"name":180,"points":181,"category":182},"6867232","Coinspotting",117,"finance_crypto",{"id":184,"name":185,"points":186,"category":187},"6861725","RiffBank",83,"creative",false,"v2",{"id":191,"name":5,"line":6,"ai":188,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":192,"top":18,"kw":193,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":194,"url":9,"mix":195,"praise":65,"objection":74,"sub":21},6888365,-0.23,[24,25,26,27,28],"0513130300010",[32,33,34,33],1793990900766]