Chinaunix
标题:
有大神解释下这个吗?
[打印本页]
作者:
xiay_
时间:
2012-10-15 14:37
标题:
有大神解释下这个吗?
cmd="ls"
$cmd
#有结果
cmd="ll"
$cmd
#ll找不到
#这是什么机制?
cmd="ls;ls"
$cmd
#ls;ls找不到
复制代码
作者:
jason680
时间:
2012-10-15 15:03
回复
1#
xiay_
try follow command and check with '+' data that you will get what different
1. set -x; ll; set +x
2. set -x; cmd=ll; $cmd; set +x
作者:
dn833
时间:
2012-10-15 15:26
ll是alias命名的不是bash命令
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2