Exporting Variables
Variables are scoped within the process it is created. If you want to access a variable that is created in another script within this(new) script then you need to export that variable.
code for script1.sh
#!/bin/bash
var1=Hello
var2=World
echo var1=$...
datainfra.hashnode.dev1 min read