I was trying to assign a variables for text files in shell script but was not able to to it.
If i have three text files one.txt, two.txt,three.txt
I wrote these variables in my source.sh file assigning for these three txt files
#!/bin/bash
abc="path/one.txt";
pqr="path/two.txt";
xyz="path/three.txt";
Then I used the following command to run shell script xyz.sh with above variables
bash xyz.sh user/bin/path abc pqr
wherein xyz.sh is as follows
#!/bin/bash
SAVEPATH=$1;
TEXTFILE1=$2;
TEXTFILE2=$3;
MY_ROOT=$(cat $SAVEPATH/.txt file containing PATH TO MY ROOT);
source $MY_ROOT/source.sh $MY_ROOT;
calculator coverage -count -a $TEXTFILE1 -b $TEXTFILE2 > output.txt;
However I am not able to get the desired output. This is just simplified example. How to solve this issue?