免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1857 | 回复: 7
打印 上一主题 下一主题

. 是什么意思? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-08-11 17:19 |只看该作者 |倒序浏览
CONFIG_FILE=/home/Package/abc/Config.txt

if [ ! -f $CONFIG_FILE ]; then
        echo "Cannot find: $CONFIG_FILE "
        exit 1
fi

. $CONFIG_FILE

请问这里的 . $CONFIG_FILE 是什么作用? . 是什么意思?

论坛徽章:
5
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:50:282015年亚洲杯之朝鲜
日期:2015-03-13 22:47:33IT运维版块每日发帖之星
日期:2016-01-09 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44
2 [报告]
发表于 2008-08-11 17:20 |只看该作者

回复 #1 lousia 的帖子

source命令?

论坛徽章:
0
3 [报告]
发表于 2008-08-11 17:24 |只看该作者
Config.txt 是脚本吗?

论坛徽章:
8
摩羯座
日期:2014-11-26 18:59:452015亚冠之浦和红钻
日期:2015-06-23 19:10:532015亚冠之西悉尼流浪者
日期:2015-08-21 08:40:5815-16赛季CBA联赛之山东
日期:2016-01-31 18:25:0515-16赛季CBA联赛之四川
日期:2016-02-16 16:08:30程序设计版块每日发帖之星
日期:2016-06-29 06:20:002017金鸡报晓
日期:2017-01-10 15:19:5615-16赛季CBA联赛之佛山
日期:2017-02-27 20:41:19
4 [报告]
发表于 2008-08-11 17:25 |只看该作者

  1.         .  filename [arguments]
  2.        source filename [arguments]
  3.               Read  and  execute  commands from filename in the current shell
  4.               environment and return the exit status of the last command exe-
  5.               cuted  from  filename.   If  filename does not contain a slash,
  6.               file names in PATH are used to find  the  directory  containing
  7.               filename.   The  file  searched  for  in  PATH need not be exe-
  8.               cutable.  When bash is not in posix mode, the current directory
  9.               is  searched  if  no  file is found in PATH.  If the sourcepath
  10.               option to the shopt builtin command is turned off, the PATH  is
  11.               not  searched.   If any arguments are supplied, they become the
  12.               positional parameters when filename is executed.  Otherwise the
  13.               positional  parameters are unchanged.  The return status is the
  14.               status of the last command exited within the script  (0  if  no
  15.               commands  are  executed), and false if filename is not found or
  16.               cannot be read.
复制代码

论坛徽章:
0
5 [报告]
发表于 2008-08-11 18:29 |只看该作者
这样用的话, 应该是 可执行的 文件

论坛徽章:
11
金牛座
日期:2015-03-19 16:56:22数据库技术版块每日发帖之星
日期:2016-08-02 06:20:00数据库技术版块每日发帖之星
日期:2016-04-24 06:20:00数据库技术版块每日发帖之星
日期:2016-04-13 06:20:00IT运维版块每日发帖之星
日期:2016-04-13 06:20:00数据库技术版块每日发帖之星
日期:2016-02-03 06:20:00数据库技术版块每日发帖之星
日期:2015-08-06 06:20:00季节之章:春
日期:2015-03-27 15:54:57羊年新春福章
日期:2015-03-27 15:54:37戌狗
日期:2015-03-19 16:56:41数据库技术版块每日发帖之星
日期:2016-08-18 06:20:00
6 [报告]
发表于 2008-08-11 19:17 |只看该作者
当前执行这个文件~~~这个东东大多数情况下应该是用于导入环境~~

论坛徽章:
0
7 [报告]
发表于 2008-08-11 21:41 |只看该作者
. = source
执行文件中的命令

论坛徽章:
0
8 [报告]
发表于 2008-08-12 09:05 |只看该作者
Config.txt 里面是一些配置信息

ip=x.x.x.x.
类似这样的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP