Lets say I have a script called foo in some folder and a script called bar in the same folder. Say foo looks like this:
./bar
Now if I call ./foo, this will work fine, but if I am in another folder and call somefolder/foo, it will fail.
How can I get this to the point where ./bar is interpreted from the directory that foo is in?
 
     
     
    