On Wed, Mar 14, 2018 at 10:47:09AM +0100, Marc Weber wrote: > I'm not a shell export, but I don't know how to return a list in bash.
Same way you return a string, or a number, or anything else: you don't. Functions in bash aren't actually functions. They're user-definable commands (procedures). Asking how to return a list from a function is exactly like asking how to return a list of filenames from "ls" or "find". > * hashes, lists, but syntax is wired (IMHO) > => can you return lists? Hell, you can't even pass a list IN as a value, let alone RETURN one. > ... -> so for anything complex use a real language, please. Agreed. https://mywiki.wooledge.org/BashWeaknesses https://mywiki.wooledge.org/BashFAQ/084