shell可以加载配置文件吗?

sh/bash/dash/ksh/zsh等Shell脚本
回复
liucheng1513
帖子: 62
注册时间: 2010-09-08 18:17

shell可以加载配置文件吗?

#1

帖子 liucheng1513 » 2011-03-20 23:28

shell可以加载配置文件吗?
比如有配置文件mail.ini
mail.ini内容是
ftp=123.192.1.2
name=admin
ps=123456

如何在shell里加载这些配置文件
头像
ebok
帖子: 852
注册时间: 2008-02-15 0:09

Re: shell可以加载配置文件吗?

#2

帖子 ebok » 2011-03-20 23:48

代码: 全选

source mail.ini
or
. mail.ini
source 与 点作用相同
Somebody think they are full of niubility, so they play a zhuangbility, but only reflect their shability.
tusooa
帖子: 6548
注册时间: 2008-10-31 22:12
系统: 践兔
联系:

Re: shell可以加载配置文件吗?

#3

帖子 tusooa » 2011-04-05 8:05

如果是导入变量,可以source

代码: 全选

] ls -ld //
回复