{"id":676,"date":"2015-05-06T13:21:05","date_gmt":"2015-05-06T13:21:05","guid":{"rendered":"http:\/\/vickistan.com\/?p=676"},"modified":"2015-05-06T13:21:05","modified_gmt":"2015-05-06T13:21:05","slug":"rough-comparison-of-bash-and-kornshell","status":"publish","type":"post","link":"https:\/\/vickistan.com\/?p=676","title":{"rendered":"Rough comparison of BASH and Kornshell"},"content":{"rendered":"<p>\n\u2022\tBASH is much easier to set a prompt that displays the current directory. To do the same in Kornshell is hackish.<br \/>\n\u2022\tKornshell has associative arrays and BASH doesn&#8217;t. Now, the last time I used Associative arrays was&#8230; Let me think&#8230; Never.<br \/>\n\u2022\tKornshell handles loop syntax a bit better. You can usually set a value in a Kornshell loop and have it available after the loop.<br \/>\n\u2022\tBash handles getting exit codes from pipes in a cleaner way.<br \/>\n\u2022\tKornshell has the print command which is way better than the echo command.<br \/>\n\u2022\tBash has tab completions. In older versions<br \/>\n\u2022\tKornshell has the r history command that allows me to quickly rerun older commands.<br \/>\n\u2022\tKornshell has the syntax cd old new which replaces old with new in your directory and CDs over there. It&#8217;s convenient when you have are in a directory called \/foo\/bar\/barfoo\/one\/bar\/bar\/foo\/bar and you need to cd to \/foo\/bar\/barfoo\/two\/bar\/bar\/foo\/bar In Kornshell, you can simply do cd one two and be done with it. In BASH, you&#8217;d have to cd ..\/..\/..\/..\/..\/two\/bar\/bar\/foo\/bar.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2022 BASH is much easier to set a prompt that displays the current directory. To do the same in Kornshell is hackish. \u2022 Kornshell has associative arrays and BASH doesn&#8217;t. Now, the last time I used Associative arrays was&#8230; Let &hellip; <a href=\"https:\/\/vickistan.com\/?p=676\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-676","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=676"}],"version-history":[{"count":1,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/676\/revisions"}],"predecessor-version":[{"id":677,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/676\/revisions\/677"}],"wp:attachment":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}