Chinaunix

标题: 这个还是看不懂 [打印本页]

作者: wuxiaobo_2009    时间: 2012-10-01 13:05
标题: 这个还是看不懂
比如我有个文件alice
$(<alice) 是指的什么,有什么地方用到, eg:xxxx

坐等高手,谢谢。
作者: kk5234    时间: 2012-10-01 14:31
man bash
Command Substitution
       Command substitution allows the output of a command to replace the command name.  There are two forms:

              $(command)
       or
              `command`

       Bash  performs  the expansion by executing command and replacing the command substitution with the stan-
       dard output of the command, with any trailing newlines deleted.  Embedded newlines are not deleted,  but
       they  may be removed during word splitting.  The command substitution $(cat file) can be replaced by the
       equivalent but faster $(< file).





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2