[问题]"()" and "{}"
-
- 帖子: 47
- 注册时间: 2006-03-21 16:21
[问题]"()" and "{}"
先在你的桌面建一个文本文件English ,随便输入点什么。。
在终端输入: debian_chroot=$(cat ~/Desktop/English)
没有错误提示~
在终端输入: debian_chroot=${cat ~/Desktop/English}
提示错误:bad substitution ---错误的替换。
()和 {} 区别是什么?
在终端输入: debian_chroot=$(cat ~/Desktop/English)
没有错误提示~
在终端输入: debian_chroot=${cat ~/Desktop/English}
提示错误:bad substitution ---错误的替换。
()和 {} 区别是什么?
-
- 帖子: 47
- 注册时间: 2006-03-21 16:21
- leal
- 帖子: 1119
- 注册时间: 2005-08-29 14:49
- 来自: 杭州
- 联系:
-
- 帖子: 53
- 注册时间: 2005-12-13 20:56
- 联系:
- zhan
- 帖子: 1880
- 注册时间: 2005-08-15 0:04
- 来自: 南7技校
-
- 帖子: 10
- 注册时间: 2006-10-04 22:20
- 来自: Chengdu Sichuan
Syntax
======
eval arg [arg ...]
Description
===========
eval takes one or more arguments, which together comprise a Tcl script
containing one or more commands. eval concatenates all its arguments in the
same fashion as the concat command, passes the concatenated string to the
Tcl interpreter recursively, and returns the result of that evaluation (or
any error generated by it).
======
eval arg [arg ...]
Description
===========
eval takes one or more arguments, which together comprise a Tcl script
containing one or more commands. eval concatenates all its arguments in the
same fashion as the concat command, passes the concatenated string to the
Tcl interpreter recursively, and returns the result of that evaluation (or
any error generated by it).
- bones7456
- 帖子: 8495
- 注册时间: 2006-04-12 20:05
- 来自: 杭州
- 联系:
-
- 帖子: 21
- 注册时间: 2006-06-03 13:55
据我所知没啥大的区别
$()这种格式更新一些,更容易嵌套使用。
-
- 帖子: 21
- 注册时间: 2006-06-03 13:55