Get the latest tech news
Moreshell tricks: first class lists, jq, and the es shell
More shell tricks: first class lists, jq, and the es shell
As a more practical example of this, let’s implement split-by-double-dash, a function (or a program) that would return two lists: args that come before-- and ones that come after. Side note: jq is an amazing utility (in fact, a programming language) that can manipulate structured data in all kinds of ways. I am a strong believer that Bourne-derived languages are extremely bad, on the same order of badness as Perl, for programming, and consider programming sh for any purpose other than as a super-portable, lowest-common-denominator platform for build or bootstrap scripts and the like, as an extremely misguided endeavor
Or read this on Hacker News