shell脚本中的include

作者在 2010-08-14 22:22:30 发布以下内容
// utils.sh 文件
#!/bin/sh

function colored_print()
{
    echo "colored print"
    echo "============================================"
    abc &> /dev/null
}

// test.sh文件
#!/bin/sh

#导入头文件
. ./utils.sh

colored_print

基础知识 | 阅读 4630 次
文章评论,共0条
游客请输入验证码
浏览1942990次