how to call a particular function from one shell another shell script

please help me in this script

shell script :1
***********
>cat file1.sh

#!/bin/bash
 
echo "this is first file"

function var()
{
a=10
b=11
}
 
function var_1()
{
c=12
d=13
}

shell script :2
***********
>cat file2.sh

#!/bin/bash
c=100
d=102
 
. file1.sh
var()
 
echo $a
echo $b
 
echo $c
echo $d

>./file2.sh

this is first file
10
11
100
102

from the above shell script from file1.sh i dont want that echo i.e (echo "this is first file")

for that i need to call that function var() only niether var_1 nor echo line in file1.sh

Try:

#!/bin/bash
c=100
d=102

. file1.sh >/dev/null
var

echo $a
echo $b

echo $c
echo $d

You could use a DEBUG variable, file1.sh echoes the line if DEBUG is set.

file1.sh:

#!/bin/bash
c=100
d=102
 
# DEBUG=on
DEBUG=

. file1.sh
var()
 
echo $a
echo $b
 
echo $c
echo $d

file2.sh:

#!/bin/bash

if [ ! -z "$DEBUG" ]; then
  echo "this is first file"
fi 

function var()
{
  a=10
  b=11
}
 
function var_1()
{
  c=12
  d=13
}