I have a shell script, /path/adir/script1.sh, that calls another script, /path/bdir/script2.sh. Now, I am in the directory /path/cdir/, and I call the first script like this:
../adir/script1.sh
The problem is that script2.sh cannot be found. In fact, even if script2.sh is in the same directory as script1.sh, the same problem occurs. The file script1.sh looks like this:
...
./script2.sh
...
How can I fix it? Thanks in advance.