[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] about the definition of `eval`
From: |
Peng Yu |
Subject: |
[Help-bash] about the definition of `eval` |
Date: |
Sat, 17 Aug 2019 15:47:57 -0500 |
Hi,
It is not clear what "Combine" means in `help eval`.
eval: eval [arg ...]
Execute arguments as a shell command.
Combine ARGs into a single string, use the result as input to the shell,
and execute the resulting commands.
Exit Status:
Returns exit status of command or success if command is null.
For example, I see this.
$ eval echo '1 b'
1 b
$ x=(echo '1 b')
$ eval "${x[*]}"
1 b
So `eval "${x[@]}"` is essentially the same as `eval "${x[*]}"` for
any array `x` in bash?
--
Regards,
Peng
- [Help-bash] about the definition of `eval`,
Peng Yu <=