linux 引入shell脚本以及配置文件的方法

引入shell脚本

#!/bin/bash
echo "you are in second file."
source ./first.sh
. ./first.sh

 

 

引入配置文件的方式

test.conf

#Just a test 

test1=123

 

#!/bin/bash

# $0: conf.sh

[ -r test1.conf ] && . ./test1.conf || echo " test1.conf file not exist"  ###如果文件存在,那么就加载文件,否则就提示

echo $test1

posted @ 2017-09-10 22:30  姚果果  阅读(1469)  评论(0编辑  收藏  举报