How can I pass multiple variables generated in one function to another funtion? Like for example
fun1(){
var1=$(cat /home/ubuntu/abc1.txt)
var2=$(cat /home/ubuntu/abc2.txt)
var3=$(cat /home/ubuntu/abc3.txt)
}
fun2(){
echo $var1
echo $var2
echo $var3
}
I am new to bash still learning. Couldn't get how to solve this :(
var1=$(< /home/ubuntu/abc1.txt).