{"id":21,"date":"2012-01-03T12:52:10","date_gmt":"2012-01-03T12:52:10","guid":{"rendered":"http:\/\/www.codehole.co.uk\/?p=21"},"modified":"2012-01-05T11:09:18","modified_gmt":"2012-01-05T11:09:18","slug":"touch-for-windows","status":"publish","type":"post","link":"https:\/\/www.codehole.co.uk\/?p=21","title":{"rendered":"touch for windows"},"content":{"rendered":"<p>A little while ago I needed to use a &#8216;flag file&#8217; mechanism in a windows command script, so I nipped out for a quick search for an executable version of touch for windows. Whilst I could find the program in a variety of locations, none of them appeared to have the ability to create a file if it doesn&#8217;t already exist. Now this is no great hassle but annoying to someone with my obsessions, so rather than my creating a file and then &#8216;touching&#8217; it (two steps), I cracked open the excellent <a href=\"http:\/\/bellard.org\/tcc\/\">tiny c compiler<\/a> (tcc) and spent a fair number of hours removing the rust from my c coding skills.<\/p>\n<p>After the last 12 years of perl and php it certainly was an odd feeling flying the c compiler again, but great fun (whilst watching the television as a neat blaming mechanism for why it was taking so long to write). So if you find yourself \u00a0in need of the executable or the source code, pay a visit to the <a href=\"https:\/\/github.com\/sdclee\/touch\">repository on github<\/a>.<\/p>\n<p>Please note that 95% of all my programming is bespoke for clients and therefore doesn&#8217;t appear in publicly accessible repos, but if there&#8217;s anything you might want by way of a short utility (bash, sed, awk, php, perl, windows cmd), add a comment to any of the postings here.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A little while ago I needed to use a &#8216;flag file&#8217; mechanism in a windows command script, so I nipped out for a quick search for an executable version of touch for windows. Whilst I could find the program in a variety of locations, none of them appeared to have the ability to create a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,4],"tags":[],"_links":{"self":[{"href":"https:\/\/www.codehole.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/21"}],"collection":[{"href":"https:\/\/www.codehole.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codehole.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codehole.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codehole.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21"}],"version-history":[{"count":3,"href":"https:\/\/www.codehole.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":24,"href":"https:\/\/www.codehole.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/21\/revisions\/24"}],"wp:attachment":[{"href":"https:\/\/www.codehole.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codehole.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codehole.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}