1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 08:22:09 +02:00
tldr/pages.zh/osx/eval.md
2019-11-02 17:47:23 +00:00

11 lines
218 B
Markdown

# eval
> 在当前 shell 中以单个命令的形式执行参数,并返回其结果.
- 使用 'foo' 做为参数调用 `echo`:
`eval "{{echo foo}}"`
- 在当前 shell 程序中设置变量:
`eval "{{foo=bar}}"`