Bash shell 获得函数返回值

在shell直接用赋值方法如 “res=$(func a b)” 是得不到结果的,会得到0.而在调用后用$?来得到返回值。 

posted @ 2012-03-30 21:04  G背包  阅读(1336)  评论(0编辑  收藏  举报