I am trying to understand passing two variables from one csh script to another csh script. Perform simple arithmatic function then passing the sum variable to the orginal csh script. Then outputing the sum variable to standard output and a file.
script1.sh
#!/bin/csh
setenv num1 3
setenv num2 2
source script2.sh
set total=$sum
echo $total > total.txt
echo $total
script2.sh
#!/bin/csh
set int1=$num1
set int2=$num2
set sum=$int1 + $int2