Article 6G1Z6 Please explain using . symbol to run a bash script with functions

Please explain using . symbol to run a bash script with functions

by
JockVSJock
from LinuxQuestions.org on (#6G1Z6)
Never seen this before, looked online and couldn't find a solid answer so going to post here.

Got a Bash script from another team in my company, and its made up of multiple functions and to run it, when used the following command, to say, run part_functionA, which I've never seen before.

Code:. script_from_other_team.sh ; part_functionAI'm used to ./ to run a script.

Here is a snippet of the bash script with some functions:

Code:#!/bin/bash

part_functionA () {
commands
commands
commands
}

part_functionB () {
commands
commands
commands
}

part_functionC () {
commands
commands
commands
}
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments