此bash脚本行中的句点是什么结果? [英] What is the consequence of the period in this line of bash script?

查看:69
本文介绍了此bash脚本行中的句点是什么结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在计算集群上运行生物信息学Web应用程序,并且正在尝试解决一些问题.该Webapp运行一个预定义的Shell脚本,该脚本传递群集计算参数(在运行计算密集型工作之前,该参数存储在名为defaultJobRunner.sh的文件中.

I am running a bioinformatics web application on a compute cluster and I'm trying to troubleshoot some issues. The webapp runs a predefined shell script that passes cluster compute parameters (stored in a file named defaultJobRunner.sh before running the computationally-intensive work.

对于创建的每个作业,都会创建一个附带的shell脚本,其中包含以下行:

For each job that is created, an accompanying shell script is created which contains the following line:

[ -f "/home/galaxy/defaultJobRunner.sh" ] && . /home/galaxy/defaultJobRunner.sh

我理解这是如果方括号中的文件是常规文件然后运行它的简写形式.我不了解的是&&

I understand this to be short-form for "if the file in the square brackets is a regular file, then run it. What I don't understand is the function or significance of that period between && and /home/galaxy/defaultJobRunner.sh

推荐答案

source的缩写.它运行/home/galaxy/defaultJobRunner.sh,就像每行都已输入到当前会话中一样. ()

It's short for source. It runs /home/galaxy/defaultJobRunner.sh as though each line had been typed into the current session. (source)

这篇关于此bash脚本行中的句点是什么结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆