Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8217963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:37:33+00:00 2026-06-07T12:37:33+00:00

cat global_features_script.sh .child1_script.sh .child2_script.sh function svn_credentials { echo -n Enter the svn username and

  • 0

cat global_features_script.sh

.child1_script.sh
.child2_script.sh

    function svn_credentials
    {
        echo -n "Enter the svn username and press [ENTER]: " > /dev/tty
        read svn_username
        echo -n "Enter the svn commit message and press [ENTER]: "  > /dev/tty
        read svn_message
        echo -n "Enter your svn password and press [ENTER]: "  > /dev/tty
        read -s svn_password
    }
    if [ a == b]
    then
    echo "a is equal to be b"
    else
    echo "a is not equal to b"
    fi

    function exit_error
    {
    echo " There is an error in the command, please check it"
    exit 1
    }

cat child_script.sh

. global_features_script.sh
svn_wc=temp_dir
svn_credentials # calling function from global_features_script.sh
svn commit $svn_wc -m "$svn_message" --username $svn_username --password $svn_password

When i execute: . child_script.sh

expected output: I need to get run only one function (svn_credentails) from global_features_script.sh

output i am getting is: its calling all other functions and also other shell scripts that are listed in global_features_script.sh

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T12:37:35+00:00Added an answer on June 7, 2026 at 12:37 pm

    From my understanding, the . master_script.sh will just insert the master script into the execution of the child_script.sh, so you’ll actually be running both scripts. The simplest thing, in my opinion, would be to just create a common_functions.sh header file that has all the common functions in it, and then just source that header file in either master or child.

    A quick syntax note, i’d recommend using source master_script.sh rather than the .. It should be functionally the same, but it’s slightly cleaner and more readable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get a suprising behaviour when I have a function local read-only variable and
I've created this class: class data { public function del($cat, $id) { global $dbh;
My question is the following. Given the following function: spam <- function() { cat(eggs\n)
% CAT(2,A,B) is the same as [A,B]. % CAT(1,A,B) is the same as [A;B].
$ cat file.txt one two three $ cat file.txt | sed s/one/1/ 1 two
$ cat Const.java public class Const { String Const(String hello) { return hello; }
I want to cat all the files in a directory, but include some spacer
I am using cat *.txt to merge multiple txt files into one, but I
cal April 2012 | cat > t | cat < t | more Why
I want to do something like this: cat abcd.txt | cut -f 2,1 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.