原帖由 "hellolinux" 發(fā)表:
ls
1
cp 1 2 && ( echo "yes" ; ls )
yes
1 2
ls
1 2
cp 1 3 && { echo "yes" ; ls } 回車出現(xiàn)>
>
( )和{ }到底有何區(qū)別,看書說()是在當前shell中執(zhí)行,{}在子shell中執(zhí)行.
在子shell中怎么不能..........
歡迎光臨 Chinaunix (http://www.72891.cn/) | Powered by Discuz! X3.2 |