[BUG] Interactive (d)ash exits on assigning to readonly from 'command eval'

2016-10-27 Thread Martijn Dekker
This bug is on both dash and busybox ash. The "command" builtin is supposed to stop special builtins (such as "eval") from exiting the shell on error. So doing something like isreadonly() { ! command eval "$1=" 2>/dev/null } ought to be a way to test if a variable is read-only

Re: Ash wildcard usability bug

2016-10-27 Thread Lauri Kasanen
On Thu, Oct 27, 2016, at 09:14, Kang-Che Sung wrote: > If you are arguing about usability, you should assume a case that you > are in an _interactive_ shell. Non-interactive environment is for > shell scripts, and for that portability and robustness will be more > important than what you called

Re: Ash wildcard usability bug

2016-10-27 Thread Kang-Che Sung
On Wed, Oct 26, 2016 at 5:28 PM, Lauri Kasanen wrote: > On Wed, Oct 26, 2016, at 05:44, Kang-Che Sung wrote: >> I wonder why you can't implement an easy workaround using ls or >> something. >> >> filename="`ls *zip | head -n 1`" >> nc 10.0.0.1 12345 < "$filename" >>