
{"id":8372,"date":"2013-04-29T18:17:39","date_gmt":"2013-04-29T18:17:39","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=8372"},"modified":"2013-04-29T18:17:39","modified_gmt":"2013-04-29T18:17:39","slug":"noclobber","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2013\/04\/29\/noclobber\/","title":{"rendered":"Basic tinkering with &#8220;set&#8221; command and &#8220;noclobber&#8221; related"},"content":{"rendered":"<h4><u>commandline session<\/u><\/h4>\n<p>[bash light=&#8221;true&#8221;]<br \/>\n$echo improve &gt; clean.txt<br \/>\n$cat clean.txt<br \/>\nimprove<br \/>\n$set -o noclobber<br \/>\n$echo new &gt; clean.txt<br \/>\nbash: clean.txt: cannot overwrite existing file<br \/>\n$echo new &gt;&gt; clean.txt<br \/>\n$cat clean.txt<br \/>\nimprove<br \/>\nnew<br \/>\n$echo again &gt;| clean.txt<br \/>\n$cat clean.txt<br \/>\nagain<br \/>\n$set +o noclobber<br \/>\n$echo improve &gt; clean.txt<br \/>\n$cat clean.txt<br \/>\nimprove<br \/>\n$<br \/>\n[\/bash]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>commandline session [bash light=&#8221;true&#8221;] $echo improve &gt; clean.txt $cat clean.txt improve $set -o noclobber $echo new &gt; clean.txt bash: clean.txt: cannot overwrite existing file $echo new &gt;&gt; clean.txt $cat clean.txt improve new $echo again &gt;| clean.txt $cat clean.txt again $set +o noclobber $echo improve &gt; clean.txt $cat clean.txt improve $ [\/bash]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[928,1174],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/8372"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=8372"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/8372\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=8372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=8372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=8372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}