{"id":3989,"date":"2017-04-24T20:41:03","date_gmt":"2017-04-25T01:41:03","guid":{"rendered":"http:\/\/neosmart.net\/blog\/?p=3989"},"modified":"2017-04-25T13:28:20","modified_gmt":"2017-04-25T18:28:20","slug":"meet-your-new-best-friend-for-wsl","status":"publish","type":"post","link":"https:\/\/neosmart.net\/blog\/meet-your-new-best-friend-for-wsl\/","title":{"rendered":"Meet $, your new best friend for WSL"},"content":{"rendered":"<p><a href=\"http:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash1.png\" rel=\"follow\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-3993 colorbox-3989\" src=\"https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash1.png\" alt=\"\" width=\"150\" height=\"150\" srcset=\"https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash1.png 512w, https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash1-150x150.png 150w, https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash1-300x300.png 300w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>We&#8217;ve raved about Microsoft&#8217;s latest take on a Linux subsystem for Windows, this time in the form of the oddly-dubbed &#8220;Bash on Ubuntu on Windows&#8221; Windows Subsystem for Linux \u2014 herein and forever after referred to only as WSL for the sake of our collective sanity \u2014 but as awesome as being able to type <code>bash<\/code> in a command prompt to get access to holy posix goodiness, we think we can do better. Meet <code>$<\/code>.<\/p>\n<p>$, formally known as <code>RunInBash<\/code>, is a simple command line helper utility that simply runs whatever follows it under WSL rather than in the current (Windows) terminal. Here&#8217;s a picture to illustrate (click to expand):<\/p>\n<p><!--more--><\/p>\n<p><a href=\"http:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash.png\" rel=\"follow\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-3990 colorbox-3989\" src=\"https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash-1024x466.png\" alt=\"\" width=\"620\" height=\"282\" srcset=\"https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash-1024x466.png 1024w, https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash-600x273.png 600w, https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash-500x227.png 500w, https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash.png 1348w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>RunInBash is the equivalent of supplying a correctly- and manually-escaped <code>bash.exe -c \"command here\"<\/code> parameter, only it takes care of all the escaping and interpolation for you.<\/p>\n<p><code>$ printf \"It's just like \\\"%s\\\"\" magic<\/code><\/p>\n<p><a href=\"http:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash-2.png\" rel=\"follow\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-3991 colorbox-3989\" src=\"https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash-2-1024x302.png\" alt=\"\" width=\"620\" height=\"183\" srcset=\"https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash-2-1024x302.png 1024w, https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash-2-600x177.png 600w, https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash-2-500x148.png 500w, https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash-2.png 1322w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>RunInBash is, of course, released 100% free under the terms of the MIT license, and is <a rel=\"nofollow\" href=\"https:\/\/github.com\/neosmart\/RunInBash\">published on GitHub<\/a>. Pull requests are welcomed and feel free to fork away!<\/p>\n<p class=\"save\"><a href=\"\/RunInBash\/\">Download RunInBash 0.1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve raved about Microsoft&#8217;s latest take on a Linux subsystem for Windows, this time in the form of the oddly-dubbed &#8220;Bash on Ubuntu on Windows&#8221; Windows Subsystem for Linux \u2014 herein and forever after referred to only as WSL for &hellip; <a href=\"https:\/\/neosmart.net\/blog\/meet-your-new-best-friend-for-wsl\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":3993,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[448,52,951,950],"class_list":["post-3989","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-freeware","tag-open-source","tag-windows-subsystem-for-linux","tag-wsl"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/neosmart.net\/blog\/wp-content\/uploads\/RunInBash1.png","jetpack_shortlink":"https:\/\/wp.me\/p4xDa-12l","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/3989","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/comments?post=3989"}],"version-history":[{"count":5,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/3989\/revisions"}],"predecessor-version":[{"id":3997,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/3989\/revisions\/3997"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/media\/3993"}],"wp:attachment":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/media?parent=3989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/categories?post=3989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/tags?post=3989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}