shell脚本读取配置文件,该怎么解决
类别:linux shell 作者:码皇 来源:我的异常网 点击:
shell脚本读取配置文件,该怎么解决shell脚本读取配置文件 www 2cto com 我现在有个配置文件config,里面内容为ID=123IP=192 168 3 154Name=test想写个shell脚本,把这几个变量的值给读出来高手指点下------解决
shell脚本读取配置文件,该怎么解决 shell脚本读取配置文件 www.2cto.com 我现在有个配置文件config,里面内容为 ID=123 IP=192.168.3.154 Name=test 想写个shell脚本,把这几个变量的值给读出来 高手指点下 ------解决方案-------------------------------------------------------- Assembly code [root@RHEL6A shcode]# more config ID=123 IP=192.168.3.154 Name=test [root@RHEL6A shcode]# echo $ID 0 [root@RHEL6A shcode]# more sh13.sh #!/bin/bash source config echo $ID echo $IP echo Name [root@RHEL6A shcode]# ./sh13.sh 123 192.168.3.154 Name
相关热词搜索:
shell 脚本 读取