Je sais pas sur quelle version tu as essayé sur 4.1 :
root@Workstation:/# bash --version
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
root@Workstation:/# help typeset
typeset: typeset [-aAfFilrtux] [-p] name[=value] ...
Set variable values and attributes.
Obsolete. See `help declare'.
root@Workstation:/# help declare
declare: declare [-aAfFilrtux] [-p] [name[=value] ...]
Set variable values and attributes.
Declare variables and give them attributes. If no NAMEs are given,
display the attributes and values of all variables.
Options:
-f restrict action or display to function names and definitions
-F restrict display to function names only (plus line number and
source file when debugging)
-p display the attributes and value of each NAME
Options which set attributes:
-a to make NAMEs indexed arrays (if supported)
-A to make NAMEs associative arrays (if supported)
-i to make NAMEs have the `integer' attribute
-l to convert NAMEs to lower case on assignment
-r to make NAMEs readonly
-t to make NAMEs have the `trace' attribute
-u to convert NAMEs to upper case on assignment
-x to make NAMEs export
Using `+' instead of `-' turns off the given attribute.
Variables with the integer attribute have arithmetic evaluation (see
the `let' command) performed when the variable is assigned a value.
When used in a function, `declare' makes NAMEs local, as with the `local'
command.
Exit Status:
Returns success unless an invalid option is supplied or an error occurs.
[^] # Re: Merci à Monsieur Sanchis
Posté par barmic 🦦 . En réponse à la dépêche Bash 5 : une introduction. Évalué à 2.
Je sais pas sur quelle version tu as essayé sur 4.1 :
https://linuxfr.org/users/barmic/journaux/y-en-a-marre-de-ce-gros-troll