Export (Bash): verschil tussen versies
Naar navigatie springen
Naar zoeken springen
Regel 19: | Regel 19: | ||
Returns success unless an invalid option is given or NAME is invalid. | Returns success unless an invalid option is given or NAME is invalid. | ||
</pre> | </pre> | ||
+ | |||
+ | == Not for associate arrays == | ||
+ | |||
+ | You can't export associate arrays. Associate arrays are a weird animal, and this is probably an example of this [https://stackoverflow.com/questions/12944674/how-to-export-an-associative-array-hash-in-bash]. | ||
== See also == | == See also == | ||
Regel 29: | Regel 33: | ||
* https://linuxhint.com/bash_export_command/ - Useful! | * https://linuxhint.com/bash_export_command/ - Useful! | ||
+ | * https://stackoverflow.com/questions/12944674/how-to-export-an-associative-array-hash-in-bash |
Versie van 7 nov 2022 17:27
$ export --help export: export [-fn] [name[=value] ...] or export -p Set export attribute for shell variables. Marks each NAME for automatic export to the environment of subsequently executed commands. If VALUE is supplied, assign VALUE before exporting. Options: -f refer to shell functions -n remove the export property from each NAME -p display a list of all exported variables and functions An argument of `--' disables further option processing. Exit Status: Returns success unless an invalid option is given or NAME is invalid.
Not for associate arrays
You can't export associate arrays. Associate arrays are a weird animal, and this is probably an example of this [1].