Re: Assignment to RO variable

2023-08-16 Thread Chet Ramey
On 8/15/23 9:57 PM, Wiley Young wrote: From within a stack of x3 functions called from a case within a for loop, when trying to assign a value to a read-only variable, `printf` and `read` both fail with exit codes of 1, and the functions, `case` and `for` commands all complete. When trying

Re: Assignment to RO variable

2023-08-16 Thread Martin D Kealey
On Wed, 16 Aug 2023 at 14:24, Dennis Williamson wrote: > Your use of colon as a comment character is confusing. > Colon is only confusing if one mistakes it for a comment. Colon is not a comment, it's a command, and therefore included in xtrace output. Of course, the real problem is that

Re: Assignment to RO variable

2023-08-16 Thread Greg Wooledge
On Tue, Aug 15, 2023 at 11:24:31PM -0500, Dennis Williamson wrote: > Your use of colon as a comment character is confusing. They're running with set -x, so presumably they used those : commands to mark the set -x output with various labels. Which seems nominally clever, except they didn't *show*

Re: formatting man pages in email (was: Assignment to RO variable)

2023-08-16 Thread Phi Debian
I find it usefull and keep it :-) Thanx tons. readonly [-aAf] [-p] [name[=word] ...] > The given names are marked readonly; the values of these > names > may not be changed by subsequent assignment. If the -f > option > is supplied, the

formatting man pages in email (was: Assignment to RO variable)

2023-08-16 Thread G. Branden Robinson
At 2023-08-15T23:24:31-0500, Dennis Williamson wrote: > From man bash: > > readonly [-aAf] [-p] [name[=word] ...] > The given names are marked readonly; the values of these > names may not be changed by subsequent assignment. If the -f option is > supplied, the functions >

Re: Assignment to RO variable

2023-08-15 Thread Dennis Williamson
On Tue, Aug 15, 2023 at 8:57 PM Wiley Young wrote: > So this behavior of `bash`s seems like a bug to me. I stumbled across it by > accident. > > From within a stack of x3 functions called from a case within a for loop, > when trying to assign a value to a read-only variable, `printf` and `read`

Assignment to RO variable

2023-08-15 Thread Wiley Young
So this behavior of `bash`s seems like a bug to me. I stumbled across it by accident. >From within a stack of x3 functions called from a case within a for loop, when trying to assign a value to a read-only variable, `printf` and `read` both fail with exit codes of 1, and the functions, `case` and