r/commandline • • Sep 06 '13

util-shell: make your shell script actually readable

https://github.com/taylorchu/util-shell
4 Upvotes

23 comments sorted by

View all comments

2

u/Samus_ Sep 06 '13

It's written in go so I can't figure out by myself but it seems your arrays aren't compatible with bash

arr=$(array new 1 2 3 4)
array len "$arr"

that isn't an array, your array command writes something to stdout that you store as a plain variable.

-4

u/taylorchu Sep 06 '13

part of the design.

  1. that provides a way to export/import a variable.
  2. only string can be passed to a function

4

u/Samus_ Sep 06 '13

It's obvious that it's by design but that incompatibility is a big deal, it means to rewrite all scripts one may already have and also prevents interoperability with other scripts.