[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: which paradigms does bash support
From: |
Greg Wooledge |
Subject: |
Re: which paradigms does bash support |
Date: |
Wed, 14 Mar 2018 09:07:58 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
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