On 3/3/13 4:40 PM, Gotmy Nick wrote: > Hello, > > Sorry if this has been reported earlier, but I can't find nothing > related in the archives. > > $ help readonly | grep -- '-p' > readonly: readonly [-aAf] [name[=value] ...] or readonly -p > -p display a list of all readonly variables and functions > > $ echo $BASH_VERSION > 4.2.37(1)-release > > I think the description should say "or" instead of "and". I think > it's the sorter way to clarify the behavior. > > This is, it will not print readonly functions unless called with > -fp, and in such case, it will not print variables, so in my opinion, > using "or" could be more accurate than "and".
This isn't accurate. Run the following script: foo() { echo foo } bar=quux readonly foo readonly bar readonly In addition to the built-in bash readonly variables, both bar and foo will be listed. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/