好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

shell脚本读取配置文件,该怎么解决 - Linux操作系统


shell脚本读取配置文件,该怎么解决

 

shell脚本读取配置文件 www.2cto.com  

我现在有个配置文件config,里面内容为

Name=test

想写个shell脚本,把这几个变量的值给读出来

高手指点下

 

------解决方案--------------------------------------------------------

Assembly code

 

[root@RHEL6A shcode]# more config 

Name=test

 

[root@RHEL6A shcode]# echo $ID

[root@RHEL6A shcode]# more sh13.sh 

#!/bin/bash

source config

echo $ID

echo $IP

echo Name

[root@RHEL6A shcode]# ./sh13.sh 

Name
 

查看更多关于shell脚本读取配置文件,该怎么解决 - Linux操作系统的详细内容...

  阅读:53次