Bash eval: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
The args are read and concatenated together into a single command. This command is then read and executed by the shell, and its exit status is returned as the value of eval. If there are no args, or only null arguments, eval returns 0. | The args are read and concatenated together into a single command. This command is then read and executed by the shell, and its exit status is returned as the value of eval. If there are no args, or only null arguments, eval returns 0. | ||
One notable use is for indirect variable mutation. See | One notable use is for indirect variable mutation. See: {{Internal|Bash_Arrays#Indirect_Variable_Access_for_Associative_Arrays|Indirect Variable Access for Associative Arrays}} |
Latest revision as of 03:21, 27 June 2020
Internal
Overview
eval [arg ...]
The args are read and concatenated together into a single command. This command is then read and executed by the shell, and its exit status is returned as the value of eval. If there are no args, or only null arguments, eval returns 0.
One notable use is for indirect variable mutation. See: