
{"id":7282,"date":"2012-05-30T13:47:19","date_gmt":"2012-05-30T13:47:19","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=7282"},"modified":"2012-05-30T13:47:19","modified_gmt":"2012-05-30T13:47:19","slug":"trouble-shooting-part-1","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2012\/05\/30\/trouble-shooting-part-1\/","title":{"rendered":"troubleshooting Part 1"},"content":{"rendered":"<h4><u>commandline session<\/u><\/h4>\n<pre>\n$ 4.2.20 5 176---&gt; cat program.sh\n#!\/bin\/bash\n# trouble: script to demonstrate common errors\nnumber=1\nif [ $number = 1 ]; then\necho \"Number is equal to 1.\"\nelse\necho \"Number is not equal to 1.\"\nfi\n$ 4.2.20 6 177---&gt; sh program.sh\nNumber is equal to 1.\n$ 4.2.20 7 178---&gt;\n\n<\/pre>\n<p>\n<u>Missing Quotes<\/u><\/p>\n<pre>\n$ 4.2.20 8 179---&gt; cat program.sh\n#!\/bin\/bash\n# trouble: script to demonstrate common errors\nnumber=1\nif [ $number = 1 ]; then\necho \"Number is equal to 1.\nelse\necho \"Number is not equal to 1.\"\nfi\n$ 4.2.20 9 180---&gt; sh program.sh\nprogram.sh: 9: program.sh: Syntax error: Unterminated quoted string\n$ 4.2.20 10 181---&gt;\n\n<\/pre>\n<p>\n<u>Missing or Unexpected Tokens<\/u><\/p>\n<pre>\n$ 4.2.20 11 182---&gt; cat program.sh\n#!\/bin\/bash\n# trouble: script to demonstrate common errors\nnumber=1\nif [ $number = 1 ] then\necho \"Number is equal to 1.\"\nelse\necho \"Number is not equal to 1.\"\nfi\n$ 4.2.20 12 183---&gt; sh program.sh\nprogram.sh: 6: program.sh: Syntax error: \"else\" unexpected (expecting \"then\")\n$ 4.2.20 13 184---&gt;\n\n<\/pre>\n<p>\n<u>Unanticipated Expansions<\/u><\/p>\n<pre>\n$ 4.2.20 14 185---&gt; cat program.sh\n#!\/bin\/bash\n# trouble: script to demonstrate common errors\nnumber=\nif [ $number = 1 ]; then\necho \"Number is equal to 1.\"\nelse\necho \"Number is not equal to 1.\"\nfi\n$ 4.2.20 15 186---&gt; sh program.sh\nprogram.sh: 4: [: =: unexpected operator\nNumber is not equal to 1.\n$ 4.2.20 16 187---&gt;\n\n<\/pre>\n<p>\n<u>Note<\/u><br \/>\nToken (parser), usually a word or other atomic parse element.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>commandline session $ 4.2.20 5 176&#8212;&gt; cat program.sh #!\/bin\/bash # trouble: script to demonstrate common errors number=1 if [ $number = 1 ]; then echo &#8220;Number is equal to 1.&#8221; else echo &#8220;Number is not equal to 1.&#8221; fi $ 4.2.20 6 177&#8212;&gt; sh program.sh Number is equal to 1. $ 4.2.20 7 178&#8212;&gt; Missing &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2012\/05\/30\/trouble-shooting-part-1\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;troubleshooting Part 1&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/7282"}],"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=7282"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/7282\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=7282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=7282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=7282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}