Hi,
I just define the variable in script and use those script in another script but the variable not recognize.
test1.sh
#!/bin/bash
DB="test_db"
USR="test_user"
PWD="test_pwd"
HST="24.254.87.12"
test2.sh
#!/bin/bash
./test1.sh
mysql -u $USR -p $PWD -h $HST $DB
To execute here got some error
./test2.sh
mysql: option '-h' requires an argument
Any work around to make it work?
Very strange, because when i put all together in one script it work. My purpose of putting into one script just to call more of my scripts those loaded variables in test1.sh.
Thanks in advanced!
Regards,
FSPalero