1 回答

TA貢獻1839條經(jīng)驗 獲得超15個贊
比面shell腳本文件:#===========test.sh! /bin/shecho_line(){ echo date echo "Wellcome to shell func!"}echo_hello(){ echo "Hello World!"}#======================shell調(diào)用兩函數(shù)啊我用【./test.sh echo_hello】卻沒輸我已經(jīng)給test.sh加執(zhí)行權(quán)限
請問envsetup.sh邊
function gettop()
{
local TOPFILE=build/core/envsetup.mk
if [ -n "$TOP" -a -f "$TOP/$TOPFILE" ] ; then
echo $TOP
else
if [ -f $TOPFILE ] ; then
# The following circumlocution (repeated below as well) ensures
# that we record the true directory name and not one that is
# faked up with symlink names.
PWD= /bin/pwd
fi
}并沒返值
調(diào)用何獲取參數(shù) T=$(gettop)
實際參數(shù)謝謝
- 1 回答
- 0 關(guān)注
- 128 瀏覽
添加回答
舉報