This is my first time using a shell script.
I have one "Mother" script mainscript.sh, in which I define the variable patientid.
patientid=`basename $folder`
Later on in the same script, I wish to execute a separate script example.sh while passing the variable patientid into it. That script already has the variable labeled as "$patientid" in it. Looking at mainscript.sh below:
./example.sh #I WANT TO PASS THE VARIABLE patientid INTO HERE!
I know this is easy-peasy for y'all. Any help is appreciated! Thanks.
example.shonly refer to$patientidor does it set it somewhere, like inpatientid=somevalue?